class RubyPlayingCards::Card
Constants
- FACE_CARDS
Attributes
rank[RW]
suit[RW]
value[RW]
Public Class Methods
new(rank, suit)
click to toggle source
# File lib/ruby_playing_cards/card.rb, line 8 def initialize(rank, suit) @value = rank @rank = FACE_CARDS[rank] || rank @suit = suit end
Public Instance Methods
to_s()
click to toggle source
# File lib/ruby_playing_cards/card.rb, line 14 def to_s "#{@suit[:icon].to_s}#{@rank}" end