Class: Migrant::InheritedSchema
Instance Attribute Summary collapse
-
#parent_schema ⇒ Object
Returns the value of attribute parent_schema.
Attributes inherited from Schema
#columns, #indexes, #validations
Instance Method Summary collapse
- #add_association(association) ⇒ Object
-
#initialize(parent_schema) ⇒ InheritedSchema
constructor
A new instance of InheritedSchema.
- #requires_migration? ⇒ Boolean
Methods inherited from Schema
#add_field, #column_migrations, #define_structure, #partial?
Constructor Details
#initialize(parent_schema) ⇒ InheritedSchema
Returns a new instance of InheritedSchema.
100 101 102 103 104 |
# File 'lib/migrant/schema.rb', line 100 def initialize(parent_schema) @parent_schema = parent_schema @columns = Hash.new @indexes = Array.new end |
Instance Attribute Details
#parent_schema ⇒ Object
Returns the value of attribute parent_schema.
98 99 100 |
# File 'lib/migrant/schema.rb', line 98 def parent_schema @parent_schema end |
Instance Method Details
#add_association(association) ⇒ Object
110 111 112 |
# File 'lib/migrant/schema.rb', line 110 def add_association(association) parent_schema.add_association(association) end |
#requires_migration? ⇒ Boolean
106 107 108 |
# File 'lib/migrant/schema.rb', line 106 def requires_migration? false # All added to base table end |