Sha256: 2a2f39278c2235bc221bc471109b90df9e361e7dcc66f20f9f6ab352448be35e

Contents?: true

Size: 1.68 KB

Versions: 32

Compression:

Stored size: 1.68 KB

Contents

# lib/gemwarrior/game_assets.rb
# Gem Warrior Global Assets
## Game Armor
## Game Creatures
## Game Items
## Game Monsters
## Game People
## Game Weapons

module Gemwarrior
  module GameArmor
    def self.add obj
      @@data ||= []
      @@data.push(obj)
    end

    def self.data
      @@data ||= []
    end

    def self.get(name)
      self.data.find { |i| i.name.downcase == name.downcase }
    end
  end

  module GameCreatures
    def self.add obj
      @@data ||= []
      @@data.push(obj)
    end

    def self.data
      @@data ||= []
    end

    def self.get(name)
      self.data.find { |i| i.name.downcase == name.downcase }
    end
  end

  module GameItems
    def self.add obj
      @@data ||= []
      @@data.push(obj)
    end

    def self.data
      @@data ||= []
    end

    def self.get(name)
      self.data.find { |i| i.name.downcase == name.downcase }
    end
  end

  module GameMonsters
    def self.add obj
      @@data ||= []
      @@data.push(obj)
    end

    def self.data
      @@data ||= []
    end

    def self.get(name)
      self.data.find { |i| i.name.downcase == name.downcase }
    end
  end

  module GamePeople
    def self.add obj
      @@data ||= []
      @@data.push(obj)
    end

    def self.data
      @@data ||= []
    end

    def self.get(name)
      self.data.find { |i| i.name.downcase == name.downcase }
    end
  end

  module GameWeapons
    def self.add obj
      @@data ||= []
      @@data.push(obj)
    end

    def self.data
      @@data ||= []
    end

    def self.get(name)
      self.data.find { |i| i.name.downcase == name.downcase }
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
gemwarrior-0.13.2 lib/gemwarrior/game_assets.rb
gemwarrior-0.13.1 lib/gemwarrior/game_assets.rb
gemwarrior-0.13.0 lib/gemwarrior/game_assets.rb
gemwarrior-0.12.8 lib/gemwarrior/game_assets.rb
gemwarrior-0.12.7 lib/gemwarrior/game_assets.rb
gemwarrior-0.12.6 lib/gemwarrior/game_assets.rb
gemwarrior-0.12.5 lib/gemwarrior/game_assets.rb
gemwarrior-0.12.4 lib/gemwarrior/game_assets.rb
gemwarrior-0.12.3 lib/gemwarrior/game_assets.rb
gemwarrior-0.12.2 lib/gemwarrior/game_assets.rb
gemwarrior-0.12.1 lib/gemwarrior/game_assets.rb
gemwarrior-0.12.0 lib/gemwarrior/game_assets.rb