Class: Gizzard::Transformation::Op::RemoveLink
- Defined in:
- lib/gizzard/transformation_op.rb
Instance Attribute Summary
Attributes inherited from LinkOp
Instance Method Summary collapse
- #apply(nameserver, table_id, base_id, table_prefix, translations) ⇒ Object
- #expand(copy_source, involved_in_copy) ⇒ Object
Methods inherited from LinkOp
Methods inherited from BaseOp
#<=>, #eql?, #inspect, #inverse?, #involved_shards
Constructor Details
This class inherits a constructor from Gizzard::Transformation::Op::LinkOp
Instance Method Details
#apply(nameserver, table_id, base_id, table_prefix, translations) ⇒ Object
136 137 138 139 140 141 |
# File 'lib/gizzard/transformation_op.rb', line 136 def apply(nameserver, table_id, base_id, table_prefix, translations) from_shard_id = from.to_shard_id(table_prefix, translations) to_shard_id = to.to_shard_id(table_prefix, translations) nameserver.remove_link(from_shard_id, to_shard_id) end |
#expand(copy_source, involved_in_copy) ⇒ Object
132 133 134 |
# File 'lib/gizzard/transformation_op.rb', line 132 def (copy_source, involved_in_copy) { (involved_in_copy ? :cleanup : :prepare) => [self] } end |