Method: Formic::Helper#get_class

Defined in:
lib/formic/helper.rb

#get_class(symbol) ⇒ Object



31
32
33
34
35
36
37
38
# File 'lib/formic/helper.rb', line 31

def get_class symbol
  classname = ''
  elements = symbol.to_s.split('_')
  elements.each do |element|
    classname += element.capitalize
  end
  return "Formic::#{classname}".constantize
end