Class: Optimus::Parser
- Inherits:
-
Object
- Object
- Optimus::Parser
- Defined in:
- lib/optimus/parser.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#implementation ⇒ Object
readonly
Returns the value of attribute implementation.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(implementation, options = nil) ⇒ Parser
constructor
A new instance of Parser.
- #inspect ⇒ Object
Constructor Details
#initialize(implementation, options = nil) ⇒ Parser
Returns a new instance of Parser.
24 25 26 27 28 29 30 31 32 |
# File 'lib/optimus/parser.rb', line 24 def initialize (implementation, =nil) @implementation = implementation if !.is_a? Hash @options = {} else @options = end end |
Instance Attribute Details
#implementation ⇒ Object (readonly)
Returns the value of attribute implementation.
22 23 24 |
# File 'lib/optimus/parser.rb', line 22 def implementation @implementation end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
22 23 24 |
# File 'lib/optimus/parser.rb', line 22 def @options end |
Instance Method Details
#inspect ⇒ Object
34 35 36 |
# File 'lib/optimus/parser.rb', line 34 def inspect "#<Parser:#{@options.inspect}>" end |