lib/rubicure/girl.rb in rubicure-0.1.4 vs lib/rubicure/girl.rb in rubicure-0.2.0

- old
+ new

@@ -1,9 +1,11 @@ module Rubicure + require "sengiri_yaml" + # Precure girl (ex. Cure Peace, Cure Rosetta, Cure Honey) # - # this is record of "config/girls.yml" + # this is record of "config/girls/*.yml" class Girl attr_reader :human_name, :precure_name, :transform_message, :extra_names, :current_state, :state_names, :created_date, :attack_messages, :transform_calls attr_writer :io @@ -52,11 +54,11 @@ def humanize! @current_state = 0 self end alias :humanize :humanize! - deprecate :humanize, :humanize! + deprecate humanize: "Use #humanize! instead of #humanize" def attack! raise "require transform" if current_attack_message.blank? print_by_line current_attack_message @@ -89,14 +91,13 @@ uniq_names << name unless uniq_names.any? { |uniq_name| config[uniq_name][:precure_name] == series[:precure_name] } end uniq_names end - # @return [Hash] content of config/girls.yml + # @return [Hash] content of config/girls/*.yml def self.config unless @@config - config_file = "#{File.dirname(__FILE__)}/../../config/girls.yml" - @@config = YAML.load_file(config_file).deep_symbolize_keys + @@config = SengiriYaml.load_dir("#{File.dirname(__FILE__)}/../../config/girls").deep_symbolize_keys end @@config end # @return [Hash] content of config/precure.yml