Class: CardGame::Trump
Instance Attribute Summary collapse
-
#suit ⇒ Object
When playing a trump card, the player can set which suit it has so that the next player has to follow it.
Attributes inherited from BaseCard
Instance Method Summary collapse
Methods inherited from BaseCard
Constructor Details
This class inherits a constructor from CardGame::BaseCard
Instance Attribute Details
#suit ⇒ Object
When playing a trump card, the player can set which suit it has so that the next player has to follow it
20 21 22 |
# File 'lib/cardgame/card.rb', line 20 def suit @suit end |
Instance Method Details
#to_s ⇒ Object
26 27 28 |
# File 'lib/cardgame/card.rb', line 26 def to_s "#{super} requiring #{@suit}" end |
#trump? ⇒ Boolean
22 23 24 |
# File 'lib/cardgame/card.rb', line 22 def trump? true end |