Class: TexasHoldem::Deck

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDeck

Returns a new instance of Deck.



6
7
8
9
# File 'lib/deck.rb', line 6

def initialize
  build
  shuffle
end

Instance Attribute Details

#cardsObject (readonly)

Returns the value of attribute cards.



4
5
6
# File 'lib/deck.rb', line 4

def cards
  @cards
end

Instance Method Details

#next_cardObject



11
12
13
# File 'lib/deck.rb', line 11

def next_card
  @cards.pop
end