Module: Playable
- Included in:
- StudioGame::Player
- Defined in:
- lib/studio_game/playable.rb
Overview
module Playable
def w00t
@health += 15
puts "#{@name} got w00ted!"
end
def blam
@health -= 10
puts "#{@name} got blammed!"
end
def strong?
@health > 100
end
end
Instance Method Summary collapse
Instance Method Details
#blam ⇒ Object
19 20 21 22 |
# File 'lib/studio_game/playable.rb', line 19 def blam @health -= 10 puts "#{@name} got blammed!" end |
#strong? ⇒ Boolean
29 30 31 |
# File 'lib/studio_game/playable.rb', line 29 def strong? @health > 100 end |
#w00t ⇒ Object
24 25 26 27 |
# File 'lib/studio_game/playable.rb', line 24 def w00t @health += 15 puts "#{@name} got w00ted!" end |