lib/pebbles/lovelive/core.rb in pebbles-lovelive-0.0.2 vs lib/pebbles/lovelive/core.rb in pebbles-lovelive-0.1.0
- old
+ new
@@ -5,18 +5,32 @@
class Core
include Singleton
def initialize
- yaml = YAML.load_file(File.join(CONFIG_PATH, 'members.yml'))
- @@members = {}
- yaml.each do |k, v|
- @@members[k] = Member.new(k, v)
- end
+ initialize_member
+ initialize_story
end
+ def story
+ @@story
+ end
+
def method_missing(method, *args)
@@members[method]
end
+
+ private
+ def initialize_member
+ yaml = YAML.load_file(File.join(CONFIG_PATH, 'members.yml'))
+ @@members = {}
+ yaml.each do |k, v|
+ @@members[k] = Member.new(k, v)
+ end
+ end
+
+ def initialize_story
+ @@story = Story.new
+ end
end
end
end