class Differential::Parser::Id

TODO

Attributes

data[R]
value[R]

Public Class Methods

new(data) click to toggle source
# File lib/differential/parser/id.rb, line 16
def initialize(data)
  @data   = Array(data)
  @value  = make_value(data)
end

Public Instance Methods

==(other) click to toggle source
# File lib/differential/parser/id.rb, line 33
def ==(other)
  eql?(other)
end
eql?(other) click to toggle source
# File lib/differential/parser/id.rb, line 25
def eql?(other)
  if other.is_a?(self.class)
    value == other.value
  else
    make_value(other) == value
  end
end
to_s() click to toggle source
# File lib/differential/parser/id.rb, line 21
def to_s
  value
end

Private Instance Methods

make_value(val) click to toggle source
# File lib/differential/parser/id.rb, line 39
def make_value(val)
  Array(val).join(':')
end