Class: BigShift::TableField
- Defined in:
- lib/big_shift/models/table_field.rb
Instance Attribute Summary collapse
-
#field_name ⇒ Object
readonly
Returns the value of attribute field_name.
-
#field_type ⇒ Object
readonly
Returns the value of attribute field_type.
Instance Method Summary collapse
- #as_json(json_state = nil) ⇒ Object
-
#initialize(field_name, field_type) ⇒ TableField
constructor
A new instance of TableField.
Methods inherited from BaseModel
Constructor Details
#initialize(field_name, field_type) ⇒ TableField
Returns a new instance of TableField.
6 7 8 9 |
# File 'lib/big_shift/models/table_field.rb', line 6 def initialize(field_name, field_type) @field_name = field_name @field_type = field_type end |
Instance Attribute Details
#field_name ⇒ Object (readonly)
Returns the value of attribute field_name.
3 4 5 |
# File 'lib/big_shift/models/table_field.rb', line 3 def field_name @field_name end |
#field_type ⇒ Object (readonly)
Returns the value of attribute field_type.
4 5 6 |
# File 'lib/big_shift/models/table_field.rb', line 4 def field_type @field_type end |
Instance Method Details
#as_json(json_state = nil) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/big_shift/models/table_field.rb', line 11 def as_json(json_state = nil) { :name => @field_name, :type => @field_type, } end |