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.15.10 lib/gemwarrior/game_assets.rb
gemwarrior-0.15.9 lib/gemwarrior/game_assets.rb
gemwarrior-0.15.8 lib/gemwarrior/game_assets.rb
gemwarrior-0.15.7 lib/gemwarrior/game_assets.rb
gemwarrior-0.15.6 lib/gemwarrior/game_assets.rb
gemwarrior-0.15.5 lib/gemwarrior/game_assets.rb
gemwarrior-0.15.4 lib/gemwarrior/game_assets.rb
gemwarrior-0.15.3 lib/gemwarrior/game_assets.rb
gemwarrior-0.15.2 lib/gemwarrior/game_assets.rb
gemwarrior-0.15.1 lib/gemwarrior/game_assets.rb
gemwarrior-0.15.0 lib/gemwarrior/game_assets.rb
gemwarrior-0.14.8 lib/gemwarrior/game_assets.rb
gemwarrior-0.14.7 lib/gemwarrior/game_assets.rb
gemwarrior-0.14.6 lib/gemwarrior/game_assets.rb
gemwarrior-0.14.5 lib/gemwarrior/game_assets.rb
gemwarrior-0.14.4 lib/gemwarrior/game_assets.rb
gemwarrior-0.14.3 lib/gemwarrior/game_assets.rb
gemwarrior-0.14.2 lib/gemwarrior/game_assets.rb
gemwarrior-0.14.1 lib/gemwarrior/game_assets.rb
gemwarrior-0.14.0 lib/gemwarrior/game_assets.rb