Class: CardDeck::Card
- Inherits:
-
Object
- Object
- CardDeck::Card
- Defined in:
- lib/card_deck.rb
Constant Summary collapse
- NUM =
Legal arguments for Card#new.
%w(Ace King Queen Jack Joker) + (2..10).to_a
Instance Attribute Summary collapse
-
#num ⇒ Object
The card’s number.
Instance Method Summary collapse
-
#initialize(num) ⇒ Card
constructor
Creates a new card.
Constructor Details
Instance Attribute Details
#num ⇒ Object
The card’s number. Must be Ace, 2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen, King, or Joker
9 10 11 |
# File 'lib/card_deck.rb', line 9 def num @num end |