Class: Immutable::Stream::Pair
- Inherits:
-
Object
- Object
- Immutable::Stream::Pair
- Defined in:
- lib/immutable/stream.rb
Instance Attribute Summary collapse
-
#head ⇒ Object
readonly
Returns the value of attribute head.
-
#tail ⇒ Object
readonly
Returns the value of attribute tail.
Instance Method Summary collapse
-
#initialize(head, tail) ⇒ Pair
constructor
A new instance of Pair.
Constructor Details
#initialize(head, tail) ⇒ Pair
Returns a new instance of Pair.
45 46 47 48 |
# File 'lib/immutable/stream.rb', line 45 def initialize(head, tail) @head = head @tail = tail end |
Instance Attribute Details
#head ⇒ Object (readonly)
Returns the value of attribute head.
43 44 45 |
# File 'lib/immutable/stream.rb', line 43 def head @head end |
#tail ⇒ Object (readonly)
Returns the value of attribute tail.
43 44 45 |
# File 'lib/immutable/stream.rb', line 43 def tail @tail end |