Class: Scissors
- Inherits:
-
Hand
show all
- Defined in:
- lib/mousevc_rock_paper_scissors/hand.rb
Instance Method Summary
collapse
Methods inherited from Hand
#<, #<=, #<=>, #==, #>, #>=, #beats?, #ties?
Instance Method Details
#compare(hand) ⇒ Object
73
74
75
76
77
78
79
80
81
82
|
# File 'lib/mousevc_rock_paper_scissors/hand.rb', line 73
def compare(hand)
case hand
when Rock
return -1
when Paper
return 1
when Scissors
return 0
end
end
|
#to_s ⇒ Object
84
85
86
|
# File 'lib/mousevc_rock_paper_scissors/hand.rb', line 84
def to_s
'scissors'
end
|