class NoSE::FieldSetting

The setting of a field from an {Update} statement

Attributes

field[R]
value[R]

Public Class Methods

new(field, value) click to toggle source
# File lib/nose/statements.rb, line 507
def initialize(field, value)
  @field = field
  @value = value

  freeze
end

Public Instance Methods

==(other) click to toggle source

Compare settings equal by their field

# File lib/nose/statements.rb, line 519
def ==(other)
  other.field == @field
end
Also aliased as: eql?
eql?(other)
Alias for: ==
hash() click to toggle source

Hash by field and value

# File lib/nose/statements.rb, line 525
def hash
  Zlib.crc32 [@field.id, @value].to_s
end
inspect() click to toggle source
# File lib/nose/statements.rb, line 514
def inspect
  "#{@field.inspect} = #{value}"
end