Sha256: 281a36ae6d4c5018d24ae0740829d292ae12e48659e097a101f0800eff3617f8
Contents?: true
Size: 375 Bytes
Versions: 4
Compression:
Stored size: 375 Bytes
Contents
module Degica class RoomLoader def self.load # load rooms.xml @rooms = YAML::load_file( File.dirname(__FILE__) + "/../../data/rooms.yml" ) @rooms.collect do |room| objects = (room["objects"] || []).map do |o| Kernel.const_get("Degica::" + o).new end Room.new(room["description"], objects) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
degica-1.0.3 | lib/degica/room_loader.rb |
degica-1.0.2 | lib/degica/room_loader.rb |
degica-1.0.1 | lib/degica/room_loader.rb |
degica-1.0.0 | lib/degica/room_loader.rb |