Class: Gizzard::Transformation::Op::ShardOp

Inherits:
BaseOp
  • Object
show all
Defined in:
lib/gizzard/transformation_op.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseOp

#<=>, #inspect, #involved_shards

Constructor Details

#initialize(template, wrapper_type = nil) ⇒ ShardOp

Returns a new instance of ShardOp.



147
148
149
150
# File 'lib/gizzard/transformation_op.rb', line 147

def initialize(template, wrapper_type=nil)
  @template = template
  @wrapper_type = wrapper_type
end

Instance Attribute Details

#templateObject (readonly)

Returns the value of attribute template.



145
146
147
# File 'lib/gizzard/transformation_op.rb', line 145

def template
  @template
end

Instance Method Details

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


156
157
158
# File 'lib/gizzard/transformation_op.rb', line 156

def eql?(other)
  super && self.template.shard_eql?(other.template)
end

#inverse?(other) ⇒ Boolean

Returns:

  • (Boolean)


152
153
154
# File 'lib/gizzard/transformation_op.rb', line 152

def inverse?(other)
  super && self.template.shard_eql?(other.template)
end