Class: AcpcPokerTypes::Hand
- Inherits:
-
PileOfCards
- Object
- Array
- PileOfCards
- AcpcPokerTypes::Hand
- Defined in:
- lib/acpc_poker_types/hand.rb
Class Method Summary collapse
Instance Method Summary collapse
- #to_acpc ⇒ Object
- #to_s ⇒ Object (also: #to_str)
Methods inherited from PileOfCards
Class Method Details
.draw_cards(*cards) ⇒ Hand
8 9 10 |
# File 'lib/acpc_poker_types/hand.rb', line 8 def self.draw_cards(*cards) AcpcPokerTypes::Hand.new cards end |
.from_acpc(acpc_string_hand) ⇒ Hand
14 15 16 |
# File 'lib/acpc_poker_types/hand.rb', line 14 def self.from_acpc(acpc_string_hand) AcpcPokerTypes::Hand.new AcpcPokerTypes::Card.cards(acpc_string_hand) end |
Instance Method Details
#to_acpc ⇒ Object
24 25 26 |
# File 'lib/acpc_poker_types/hand.rb', line 24 def to_acpc (map { |card| card.to_acpc }).join end |
#to_s ⇒ Object Also known as: to_str
18 19 20 |
# File 'lib/acpc_poker_types/hand.rb', line 18 def to_s join end |