Module: ASCIICards
- Defined in:
- lib/ascii_cards.rb,
lib/ascii_cards/version.rb
Constant Summary collapse
- RANK_SYMBOLS =
{ 2 => '2', 3 => '3', 4 => '4', 5 => '5', 6 => '6', 7 => '7', 8 => '8', 9 => '9', 10 => '10', jack: 'J', queen: 'Q', king: 'K', ace: 'A' }.freeze
- SUIT_SYMBOLS =
{ spades: '♠', diamonds: '♦', hearts: '♥', clubs: '♣' }.freeze
- VERSION =
'1.0.0'
Class Method Summary collapse
Class Method Details
.stringify(*cards) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/ascii_cards.rb', line 31 def stringify(*cards) join_cards( cards.map do |rank, suit, state = :visible| if state == :hidden hidden_card else format_card(rank, suit) end end ) end |