Sha256: 2beece6326b9a8408ead15989d12b8a294b88c750e92f4c3f5b59ec7074fca22

Contents?: true

Size: 427 Bytes

Versions: 15

Compression:

Stored size: 427 Bytes

Contents

# lib/gemwarrior/entities/item.rb
# Entity::Item base class

require_relative 'entity'

module Gemwarrior
  class Item < Entity
    attr_accessor :is_armor,
                  :is_weapon
  
    attr_reader   :use

    def initialize
      super
      
      self.is_armor   = false
      self.is_weapon  = false
    end

    def use(world)
      'That item does not do anything...yet.'
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
gemwarrior-0.12.8 lib/gemwarrior/entities/item.rb
gemwarrior-0.12.7 lib/gemwarrior/entities/item.rb
gemwarrior-0.12.6 lib/gemwarrior/entities/item.rb
gemwarrior-0.12.5 lib/gemwarrior/entities/item.rb
gemwarrior-0.12.4 lib/gemwarrior/entities/item.rb
gemwarrior-0.12.3 lib/gemwarrior/entities/item.rb
gemwarrior-0.12.2 lib/gemwarrior/entities/item.rb
gemwarrior-0.12.1 lib/gemwarrior/entities/item.rb
gemwarrior-0.12.0 lib/gemwarrior/entities/item.rb
gemwarrior-0.11.5 lib/gemwarrior/entities/item.rb
gemwarrior-0.11.4 lib/gemwarrior/entities/item.rb
gemwarrior-0.11.3 lib/gemwarrior/entities/item.rb
gemwarrior-0.11.2 lib/gemwarrior/entities/item.rb
gemwarrior-0.11.1 lib/gemwarrior/entities/item.rb
gemwarrior-0.11.0 lib/gemwarrior/entities/item.rb