class NoSE::Plans::UpdatePlanStep

A superclass for steps which modify indexes

Attributes

index[R]
state[RW]

Public Class Methods

new(index, type, state = nil) click to toggle source
Calls superclass method NoSE::Plans::PlanStep::new
# File lib/nose/plans/update.rb, line 10
def initialize(index, type, state = nil)
  super()
  @index = index
  @type = type

  return if state.nil?
  @state = state.dup
  @state.freeze
end

Public Instance Methods

==(other) click to toggle source

Two insert steps are equal if they use the same index

# File lib/nose/plans/update.rb, line 27
def ==(other)
  other.instance_of?(self.class) && @index == other.index && \
    @type == other.instance_variable_get(:@type)
end
Also aliased as: eql?
eql?(other)
Alias for: ==
hash() click to toggle source
# File lib/nose/plans/update.rb, line 33
def hash
  [@index, @type].hash
end
to_color() click to toggle source

:nocov:

# File lib/nose/plans/update.rb, line 21
def to_color
  "#{super} #{@index.to_color} * #{@state.cardinality}"
end