Class: Draisine::TypeMapper::ActiveRecordColumnDef
- Inherits:
-
Struct
- Object
- Struct
- Draisine::TypeMapper::ActiveRecordColumnDef
- Defined in:
- lib/draisine/type_mapper.rb
Instance Attribute Summary collapse
-
#column_name ⇒ Object
Returns the value of attribute column_name.
-
#column_type ⇒ Object
Returns the value of attribute column_type.
-
#options ⇒ Object
Returns the value of attribute options.
Class Method Summary collapse
Instance Attribute Details
#column_name ⇒ Object
Returns the value of attribute column_name
5 6 7 |
# File 'lib/draisine/type_mapper.rb', line 5 def column_name @column_name end |
#column_type ⇒ Object
Returns the value of attribute column_type
5 6 7 |
# File 'lib/draisine/type_mapper.rb', line 5 def column_type @column_type end |
#options ⇒ Object
Returns the value of attribute options
5 6 7 |
# File 'lib/draisine/type_mapper.rb', line 5 def @options end |
Class Method Details
.from_ar_column(ar_col) ⇒ Object
6 7 8 |
# File 'lib/draisine/type_mapper.rb', line 6 def self.from_ar_column(ar_col) new(ar_col.name, ar_col.type, { limit: ar_col.limit }.compact) end |