Module: HTOTConv::Parser
- Defined in:
- lib/htot_conv/parser.rb,
lib/htot_conv/parser/base.rb,
lib/htot_conv/parser/opml.rb,
lib/htot_conv/parser/dir_tree.rb,
lib/htot_conv/parser/html_list.rb,
lib/htot_conv/parser/simple_text.rb
Defined Under Namespace
Classes: Base, DirTree, HtmlList, Opml, SimpleText
Class Method Summary
collapse
Class Method Details
.create(type, *args) ⇒ Object
10
11
12
13
|
# File 'lib/htot_conv/parser.rb', line 10
def create(type, *args)
klass = HTOTConv::Parser.const_get(Rinne.camelize(type.to_s))
klass.new(*args)
end
|
.types ⇒ Object
16
17
18
19
20
21
22
23
24
|
# File 'lib/htot_conv/parser.rb', line 16
def types
HTOTConv::Parser.constants.reject { |klass|
klass =~ /Base$/
}.select { |klass|
HTOTConv::Parser.const_get(klass).kind_of?(Class)
}.map { |klass|
Rinne.to_snake(klass.to_s).to_sym
}
end
|