Class: ROM::SQL::Migration::SchemaDiff::IndexDiff Private
- Inherits:
-
Object
- Object
- ROM::SQL::Migration::SchemaDiff::IndexDiff
- 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
- #index ⇒ Object readonly private
Instance Method Summary collapse
- #attributes ⇒ Object private
-
#initialize(index) ⇒ IndexDiff
constructor
private
A new instance of IndexDiff.
- #name ⇒ Object private
Constructor Details
#initialize(index) ⇒ IndexDiff
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 IndexDiff.
116 117 118 |
# File 'lib/rom/sql/migration/schema_diff.rb', line 116 def initialize(index) @index = index end |
Instance Attribute Details
#index ⇒ 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.
114 115 116 |
# File 'lib/rom/sql/migration/schema_diff.rb', line 114 def index @index end |
Instance Method Details
#attributes ⇒ 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.
120 121 122 123 124 125 126 127 128 |
# File 'lib/rom/sql/migration/schema_diff.rb', line 120 def attributes list = index.attributes.map(&:name) if list.size == 1 list[0] else list end end |
#name ⇒ 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.
130 131 132 |
# File 'lib/rom/sql/migration/schema_diff.rb', line 130 def name index.name end |