module HTOTConv::Parser

Public Class Methods

create(type, *args) click to toggle source
# File lib/htot_conv/parser.rb, line 11
def create(type, *args)
  klass = HTOTConv::Parser.const_get(Rinne.camelize(type.to_s))
  klass.new(*args)
end
types() click to toggle source
# File lib/htot_conv/parser.rb, line 17
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

Private Instance Methods

create(type, *args) click to toggle source
# File lib/htot_conv/parser.rb, line 11
def create(type, *args)
  klass = HTOTConv::Parser.const_get(Rinne.camelize(type.to_s))
  klass.new(*args)
end
types() click to toggle source
# File lib/htot_conv/parser.rb, line 17
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