lib/yaml_master.rb in yaml_master-0.4.1 vs lib/yaml_master.rb in yaml_master-0.4.2

- old
+ new

@@ -76,13 +76,17 @@ end end def parse_properties(property_strings) @properties = {} - property_strings.each_with_object(@properties) do |str, hash| - key, value = str.split("=") - raise PropertyParseError.new("#{str} is invalid format") unless key && value - hash[key] = value + if property_strings.is_a?(Hash) + @properties = property_strings + else + property_strings.each_with_object(@properties) do |str, hash| + key, value = str.split("=") + raise PropertyParseError.new("#{str} is invalid format") unless key && value + hash[key] = value + end end end class EmbeddedMethods def initialize(yaml_master)