Class: Farseer::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/farseer/result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(token, rest) ⇒ Result

Returns a new instance of Result.



5
6
7
8
9
# File 'lib/farseer/result.rb', line 5

def initialize(token, rest)
  @token = token
  @rest = rest
  freeze
end

Instance Attribute Details

#restObject (readonly)

Returns the value of attribute rest.



10
11
12
# File 'lib/farseer/result.rb', line 10

def rest
  @rest
end

#tokenObject (readonly)

Returns the value of attribute token.



10
11
12
# File 'lib/farseer/result.rb', line 10

def token
  @token
end

Instance Method Details

#==(other) ⇒ Object Also known as: eql?



12
13
14
15
16
# File 'lib/farseer/result.rb', line 12

def ==(other)
  self.class.eql?(other.class) and
    token == (other.token) and
    rest.eql?(other.rest)
end