Sha256: 9076fdb343d2016b29e6253bc0525423d9b127b0615994f5d6e65034070b6516

Contents?: true

Size: 437 Bytes

Versions: 1

Compression:

Stored size: 437 Bytes

Contents

=begin rdoc

= 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

== Note

This class probably needs some enhancements to 
be truly considered a Tuple. For instance, should
a Tuple by multiton?

=end

class Tuple < Array
  include Comparable
  
  def initialize(*args)
    super()
    self.concat args
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
carats-0.3.0 lib/carat/tuple.rb