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



106
107
108
109
110
111
112
113
114
115
116
# File 'lib/rails/generators/neo4j_generator.rb', line 106

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