Class: ROM::SQL::Migration::SchemaDiff::ForeignKeyDiff Private
- Inherits:
-
Object
- Object
- ROM::SQL::Migration::SchemaDiff::ForeignKeyDiff
- Defined in:
- lib/rom/sql/migration/schema_diff.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Direct Known Subclasses
Instance Attribute Summary collapse
- #foreign_key ⇒ Object readonly private
Instance Method Summary collapse
- #child_keys ⇒ Object private
-
#initialize(foreign_key) ⇒ ForeignKeyDiff
constructor
private
A new instance of ForeignKeyDiff.
- #parent ⇒ Object private
- #parent_keys ⇒ Object private
Constructor Details
#initialize(foreign_key) ⇒ ForeignKeyDiff
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ForeignKeyDiff.
158 159 160 |
# File 'lib/rom/sql/migration/schema_diff.rb', line 158 def initialize(foreign_key) @foreign_key = foreign_key end |
Instance Attribute Details
#foreign_key ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
156 157 158 |
# File 'lib/rom/sql/migration/schema_diff.rb', line 156 def foreign_key @foreign_key end |
Instance Method Details
#child_keys ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
170 171 172 |
# File 'lib/rom/sql/migration/schema_diff.rb', line 170 def child_keys foreign_key.attributes.map(&:name) end |
#parent ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
162 163 164 |
# File 'lib/rom/sql/migration/schema_diff.rb', line 162 def parent foreign_key.parent_table end |
#parent_keys ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
166 167 168 |
# File 'lib/rom/sql/migration/schema_diff.rb', line 166 def parent_keys foreign_key.parent_keys end |