Class: Rails::Generators::GeneratedAttribute

Inherits:
Object
  • Object
show all
Defined in:
lib/rails/generators/neo4j_generator.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#type_classObject



54
55
56
57
58
59
60
61
62
63
64
# File 'lib/rails/generators/neo4j_generator.rb', line 54

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