Class: Gizzard::Transformation::Op::LinkOp
- Defined in:
- lib/gizzard/transformation_op.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#from ⇒ Object
readonly
Returns the value of attribute from.
-
#to ⇒ Object
(also: #template)
readonly
Returns the value of attribute to.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
-
#initialize(from, to, wrapper_type = nil) ⇒ LinkOp
constructor
A new instance of LinkOp.
- #inverse?(other) ⇒ Boolean
Methods inherited from BaseOp
#<=>, #inspect, #involved_shards
Constructor Details
#initialize(from, to, wrapper_type = nil) ⇒ LinkOp
Returns a new instance of LinkOp.
97 98 99 100 101 |
# File 'lib/gizzard/transformation_op.rb', line 97 def initialize(from, to, wrapper_type=nil) @from = from @to = to @wrapper_type = wrapper_type end |
Instance Attribute Details
#from ⇒ Object (readonly)
Returns the value of attribute from.
94 95 96 |
# File 'lib/gizzard/transformation_op.rb', line 94 def from @from end |
#to ⇒ Object (readonly) Also known as: template
Returns the value of attribute to.
94 95 96 |
# File 'lib/gizzard/transformation_op.rb', line 94 def to @to end |
Instance Method Details
#eql?(other) ⇒ Boolean
107 108 109 |
# File 'lib/gizzard/transformation_op.rb', line 107 def eql?(other) super && self.from.link_eql?(other.from) && self.to.link_eql?(other.to) end |
#inverse?(other) ⇒ Boolean
103 104 105 |
# File 'lib/gizzard/transformation_op.rb', line 103 def inverse?(other) super && self.from.link_eql?(other.from) && self.to.link_eql?(other.to) end |