class Ruboty::Slot::SlotMachine
Public Instance Methods
pull_lever()
click to toggle source
# File lib/ruboty/slot/slot_machine.rb, line 10 def pull_lever reels.each(&:roll) end
reels()
click to toggle source
# File lib/ruboty/slot/slot_machine.rb, line 6 def reels [] end
to_s()
click to toggle source
# File lib/ruboty/slot/slot_machine.rb, line 18 def to_s first, *rest = reels.map(&:to_a) first.zip(*rest).map(&:join).join($/) end