Class: HTOTConv::Parser::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/htot_conv/parser/base.rb

Direct Known Subclasses

DirTree, HtmlList, Opml, SimpleText

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(option = {}) ⇒ Base

Returns a new instance of Base.



5
6
7
# File 'lib/htot_conv/parser/base.rb', line 5

def initialize(option={})
  @option = self.class.option_help.inject({}) { |h, pair| h[pair[0]] = pair[1][:default]; h}.merge(option)
end

Instance Attribute Details

#optionObject

Returns the value of attribute option.



8
9
10
# File 'lib/htot_conv/parser/base.rb', line 8

def option
  @option
end

Class Method Details

.option_helpObject



10
11
12
# File 'lib/htot_conv/parser/base.rb', line 10

def self.option_help
  {}
end