module HTOTConv::Generator

Public Class Methods

create(type, *args) click to toggle source
# File lib/htot_conv/generator.rb, line 13
def create(type, *args)
  klass = HTOTConv::Generator.const_get(Rinne.camelize(type.to_s))
  klass.new(*args)
end
types() click to toggle source
# File lib/htot_conv/generator.rb, line 19
def types
  HTOTConv::Generator.constants.reject { |klass|
    klass =~ /Base$/
  }.select { |klass|
    HTOTConv::Generator.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/generator.rb, line 13
def create(type, *args)
  klass = HTOTConv::Generator.const_get(Rinne.camelize(type.to_s))
  klass.new(*args)
end
types() click to toggle source
# File lib/htot_conv/generator.rb, line 19
def types
  HTOTConv::Generator.constants.reject { |klass|
    klass =~ /Base$/
  }.select { |klass|
    HTOTConv::Generator.const_get(klass).kind_of?(Class)
  }.map { |klass|
    Rinne.to_snake(klass.to_s).to_sym
  }
end