Module: ActiveGraph::Generators::GeneratedAttribute

Defined in:
lib/active_graph/generators/generated_attribute.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#type_classObject



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/active_graph/generators/generated_attribute.rb', line 4

def type_class
  case type.to_s.downcase
  when 'any' then 'any'
  when 'datetime' then 'DateTime'
  when 'date' then 'Date'
  when 'integer', 'number', 'fixnum' then 'Integer'
  when 'float' then 'Float'
  else
    'String'
  end
end