Class: Packwerk::Parsers::Factory
- Inherits:
-
Object
- Object
- Packwerk::Parsers::Factory
- Extended by:
- T::Sig
- Includes:
- Singleton
- Defined in:
- lib/packwerk/parsers/factory.rb
Instance Method Summary collapse
- #erb_parser_class ⇒ Object
- #erb_parser_class=(klass) ⇒ Object
- #for_path(path) ⇒ Object
-
#initialize ⇒ Factory
constructor
A new instance of Factory.
Constructor Details
#initialize ⇒ Factory
Returns a new instance of Factory.
24 25 26 27 28 |
# File 'lib/packwerk/parsers/factory.rb', line 24 def initialize @ruby_parser = T.let(nil, T.nilable(ParserInterface)) @erb_parser = T.let(nil, T.nilable(ParserInterface)) @erb_parser_class = T.let(nil, T.nilable(T::Class[T.anything])) end |
Instance Method Details
#erb_parser_class ⇒ Object
41 42 43 |
# File 'lib/packwerk/parsers/factory.rb', line 41 def erb_parser_class @erb_parser_class ||= Erb end |
#erb_parser_class=(klass) ⇒ Object
46 47 48 49 |
# File 'lib/packwerk/parsers/factory.rb', line 46 def erb_parser_class=(klass) @erb_parser_class = klass @erb_parser = nil end |