Class: BigShift::TableField
- Defined in:
- lib/big_shift/models/table_field.rb
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.
3 4 5 6 |
# File 'lib/big_shift/models/table_field.rb', line 3 def initialize(field_name, field_type) @field_name = field_name @field_type = field_type end |
Instance Method Details
#as_json(json_state = nil) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/big_shift/models/table_field.rb', line 8 def as_json(json_state = nil) { :name => @field_name, :type => @field_type, } end |