yaml_master 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 15ea99a5ddf2aad7d4e9eac308400108c50cf6dc
4
- data.tar.gz: f5e97d475728bda4deaef74d58e7779fda2f0010
3
+ metadata.gz: 6b92fa420cc7d3c24f1bb62a31383d801a9723fb
4
+ data.tar.gz: 18dc5fe8f6ac65c4b5944bca3ab5a1cc1beb05c2
5
5
  SHA512:
6
- metadata.gz: e9c71f35c6b98a710a5567b5b062cae2fab3e332870475aefeac1ed78905648442e8c65b915c9a7f2ed4f1b00ef403c9abd55b286c0ef978790fd6bdaca45d90
7
- data.tar.gz: 65b1d23abf0f92cdebfad3fa7fb778b878cc3e0afeb6e3529055c173556c1a94ab3e2462d51efb58215f0b90b18f9ddaf49e38083e2deeed16215f5f4379e57b
6
+ metadata.gz: 77f5487fa6c68e326d89277ff4e94e6cb8c4338e28c817009921df0697c807b8533f25736b37c85eca140d53c285b1aba7cc5bfd287f5e748e1eacec0ec55b39
7
+ data.tar.gz: 1ac82cbab64bd30db593e37bac4db1d3913a0540b30e5e5312948390d70a8edfa740be60ef30d54d0a6e779a3ddc30b59b797d42192c6f810146e2b6e01ce9ef
data/lib/yaml_master.rb CHANGED
@@ -78,10 +78,14 @@ class YamlMaster
78
78
 
79
79
  def parse_properties(property_strings)
80
80
  @properties = {}
81
- property_strings.each_with_object(@properties) do |str, hash|
82
- key, value = str.split("=")
83
- raise PropertyParseError.new("#{str} is invalid format") unless key && value
84
- hash[key] = value
81
+ if property_strings.is_a?(Hash)
82
+ @properties = property_strings
83
+ else
84
+ property_strings.each_with_object(@properties) do |str, hash|
85
+ key, value = str.split("=")
86
+ raise PropertyParseError.new("#{str} is invalid format") unless key && value
87
+ hash[key] = value
88
+ end
85
89
  end
86
90
  end
87
91
 
@@ -1,3 +1,3 @@
1
1
  class YamlMaster
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yaml_master
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - joker1007
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-01-06 00:00:00.000000000 Z
11
+ date: 2016-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: slop