Class: Charming::Generators::ModelGenerator::Field

Inherits:
Data
  • Object
show all
Defined in:
lib/charming/generators/model_generator.rb

Overview

A single model field: column name and ActiveRecord type (e.g., “string”).

Instance Attribute Summary collapse

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



11
12
13
# File 'lib/charming/generators/model_generator.rb', line 11

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



11
12
13
# File 'lib/charming/generators/model_generator.rb', line 11

def type
  @type
end