Class: ActiveRecordSchemaScrapper::Attribute
- Inherits:
-
Object
- Object
- ActiveRecordSchemaScrapper::Attribute
- Defined in:
- lib/active_record_schema_scrapper/attribute.rb
Instance Method Summary collapse
-
#initialize(type: nil, precision: nil, scale: nil, default: nil, cast_type: nil, name: nil, limit: nil, null: nil) ⇒ Attribute
constructor
A new instance of Attribute.
Constructor Details
#initialize(type: nil, precision: nil, scale: nil, default: nil, cast_type: nil, name: nil, limit: nil, null: nil) ⇒ Attribute
Returns a new instance of Attribute.
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/active_record_schema_scrapper/attribute.rb', line 11 def initialize(type: nil, precision: nil, scale: nil, default: nil, cast_type: nil, name: nil, limit: nil, null: nil) default = init_default({ default: default, cast_type: cast_type, type: type }) type = init_type(type, { type: type, cast_type: cast_type }) super end |