Class: HTOTConv::Parser::Base
- Inherits:
-
Object
- Object
- HTOTConv::Parser::Base
- Defined in:
- lib/htot_conv/parser/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#option ⇒ Object
Returns the value of attribute option.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(option = {}) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(option = {}) ⇒ Base
Returns a new instance of Base.
4 5 6 |
# File 'lib/htot_conv/parser/base.rb', line 4 def initialize(option={}) @option = self.class.option_help.inject({}) { |h, pair| h[pair[0]] = pair[1][:default]; h}.merge(option) end |
Instance Attribute Details
#option ⇒ Object
Returns the value of attribute option.
7 8 9 |
# File 'lib/htot_conv/parser/base.rb', line 7 def option @option end |
Class Method Details
.option_help ⇒ Object
9 10 11 |
# File 'lib/htot_conv/parser/base.rb', line 9 def self.option_help {} end |