Class: Tuple

Inherits:
Array show all
Includes:
Comparable
Defined in:
lib/mega/tuple.rb

Overview

:title: Tuple

A Tuple is essentially an Array that is also Comaparable.

Usage

t1 = Tuple.new(1,2,3)
t2 = Tuple.new(2,3,4)

t1 > t2   #=> false
t2 > t1   #=> true

Instance Method Summary collapse

Methods included from DupReplaceSnapshotMixin

#restore_snapshot, #take_snapshot

Constructor Details

#initialize(*args) ⇒ Tuple

Returns a new instance of Tuple.



44
45
46
47
# File 'lib/mega/tuple.rb', line 44

def initialize(*args)
  super()
  self.concat args
end