lib/Gosuplus/resourcemanager.rb in Gosuplus-1.0 vs lib/Gosuplus/resourcemanager.rb in Gosuplus-1.0.1

- old
+ new

@@ -1,15 +1,17 @@ -class ResourceManager - def initialize(window) - @window = window - @resources = {} - end +module Gosuplus + class ResourceManager + def initialize(window) + @window = window + @resources = {} + end - def load_resources(state_name) - @resources = ResourceLoader.new(state_name, @window).load_resources - end + def load_resources(state_name) + @resources = ResourceLoader.new(state_name, @window).load_resources + end - def [](*keys) - return @resources[keys[0]] if keys.size == 1 - keys.map {|key| @resources[key]} + def [](*keys) + return @resources[keys[0]] if keys.size == 1 + keys.map {|key| @resources[key]} + end end end \ No newline at end of file