Class: Farseer::Result
- Inherits:
-
Object
- Object
- Farseer::Result
- Defined in:
- lib/farseer/result.rb
Instance Attribute Summary collapse
-
#rest ⇒ Object
readonly
Returns the value of attribute rest.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
-
#initialize(token, rest) ⇒ Result
constructor
A new instance of Result.
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
#rest ⇒ Object (readonly)
Returns the value of attribute rest.
10 11 12 |
# File 'lib/farseer/result.rb', line 10 def rest @rest end |
#token ⇒ Object (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 |