Class: Tuple
- Inherits:
-
Object
- Object
- Tuple
- Defined in:
- lib/ruby_ext/more/tuple.rb
Instance Attribute Summary collapse
-
#first ⇒ Object
Returns the value of attribute first.
-
#last ⇒ Object
Returns the value of attribute last.
Instance Method Summary collapse
-
#initialize(first = nil, last = nil) ⇒ Tuple
constructor
A new instance of Tuple.
Constructor Details
#initialize(first = nil, last = nil) ⇒ Tuple
Returns a new instance of Tuple.
4 5 6 |
# File 'lib/ruby_ext/more/tuple.rb', line 4 def initialize first = nil, last = nil @first, @last = first, last end |
Instance Attribute Details
#first ⇒ Object
Returns the value of attribute first.
2 3 4 |
# File 'lib/ruby_ext/more/tuple.rb', line 2 def first @first end |
#last ⇒ Object
Returns the value of attribute last.
2 3 4 |
# File 'lib/ruby_ext/more/tuple.rb', line 2 def last @last end |