Class: Rafflesia::TableColumn
- Inherits:
-
Rafflesia::Types::BaseModel
- Object
- Rafflesia::Types::BaseModel
- Rafflesia::TableColumn
- Defined in:
- lib/rafflesia/annotations/table_column.rb
Constant Summary collapse
- HASH_ATTRS =
{ is_nullable: :is_nullable, name: :name, ordinal: :ordinal, type: :type }.freeze
Instance Attribute Summary collapse
-
#is_nullable ⇒ Object
Returns the value of attribute is_nullable.
-
#name ⇒ Object
Returns the value of attribute name.
-
#ordinal ⇒ Object
Returns the value of attribute ordinal.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(json) ⇒ TableColumn
constructor
A new instance of TableColumn.
Constructor Details
#initialize(json) ⇒ TableColumn
Returns a new instance of TableColumn.
21 22 23 24 25 26 27 28 |
# File 'lib/rafflesia/annotations/table_column.rb', line 21 def initialize(json) super() hash = self.class.normalize(json) @is_nullable = hash[:is_nullable] @name = hash[:name] @ordinal = hash[:ordinal] @type = hash[:type] end |
Instance Attribute Details
#is_nullable ⇒ Object
Returns the value of attribute is_nullable.
15 16 17 |
# File 'lib/rafflesia/annotations/table_column.rb', line 15 def is_nullable @is_nullable end |
#name ⇒ Object
Returns the value of attribute name.
15 16 17 |
# File 'lib/rafflesia/annotations/table_column.rb', line 15 def name @name end |
#ordinal ⇒ Object
Returns the value of attribute ordinal.
15 16 17 |
# File 'lib/rafflesia/annotations/table_column.rb', line 15 def ordinal @ordinal end |
#type ⇒ Object
Returns the value of attribute type.
15 16 17 |
# File 'lib/rafflesia/annotations/table_column.rb', line 15 def type @type end |