Class: Gambit::Tools::Cards::Card

Inherits:
Object
  • Object
show all
Includes:
Comparable, Viewable
Defined in:
lib/gambit/tools/cards/card.rb

Overview

The base class for all Card objects using the Gambit tools framework.

Direct Known Subclasses

StandardCard

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Viewable

append_features, #view

Class Method Details

.eachObject

Subclasses must provide a creation iterator that will yield each Card in a Deck.

Raises:

  • (NotImplementedError)


30
31
32
33
# File 'lib/gambit/tools/cards/card.rb', line 30

def self.each(  )
	raise NotImplementedError,
	      "Subclasses must override self.each()."
end

Instance Method Details

#<=>(other) ⇒ Object

Sublclasses must provide a comparator method.

Raises:

  • (NotImplementedError)


38
39
40
# File 'lib/gambit/tools/cards/card.rb', line 38

def <=>( other )
	raise NotImplementedError, "Subclasses must override <=>()."
end