class Gemwarrior::Tent
Public Class Methods
new()
click to toggle source
Calls superclass method
Gemwarrior::Item::new
# File lib/gemwarrior/entities/items/tent.rb, line 8 def initialize super self.name = 'tent' self.name_display = 'Tent' self.description = 'A magical, two-room suite pops up when you flick this otherwise folded piece of canvas just right, perfect for a night\'s rest.' self.takeable = true self.number_of_uses = 5 end
Public Instance Methods
use(world)
click to toggle source
# File lib/gemwarrior/entities/items/tent.rb, line 18 def use(world) { type: 'tent', data: self.number_of_uses } end