Class: BigShift::TableField

Inherits:
BaseModel show all
Defined in:
lib/big_shift/models/table_field.rb

Instance Method Summary collapse

Methods inherited from BaseModel

#to_json

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