Class: Tuple

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_ext/more/tuple.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#firstObject

Returns the value of attribute first.



2
3
4
# File 'lib/ruby_ext/more/tuple.rb', line 2

def first
  @first
end

#lastObject

Returns the value of attribute last.



2
3
4
# File 'lib/ruby_ext/more/tuple.rb', line 2

def last
  @last
end