Class: Poker::Deck

Inherits:
Array
  • Object
show all
Defined in:
lib/poker/deck.rb

Instance Method Summary collapse

Constructor Details

#initializeDeck

Returns a new instance of Deck.



3
4
5
6
7
8
9
10
11
# File 'lib/poker/deck.rb', line 3

def initialize
  cards = []
  Card::SUITS.each { |s|
    Card::RANKS.each { |r|
      cards << Card.new(r+s)
    }
  }
  super(cards)
end