yaml-ostruct 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/yaml/ostruct.rb +4 -0
- data/lib/yaml/version.rb +1 -1
- data/lib/yaml/yaml_ostruct_impl.rb +5 -1
- metadata +2 -2
data/lib/yaml/ostruct.rb
CHANGED
data/lib/yaml/version.rb
CHANGED
@@ -17,12 +17,16 @@ module YamlOstruct
|
|
17
17
|
@deep_merge = args.fetch :deep_merge, false
|
18
18
|
end
|
19
19
|
|
20
|
+
def delete(key)
|
21
|
+
@config.delete_field(key)
|
22
|
+
end
|
23
|
+
|
20
24
|
def method_missing(method_sym, *args)
|
21
25
|
if @config.respond_to? method_sym
|
22
26
|
@config.send method_sym, *args
|
23
27
|
elsif method_sym.to_s.end_with?('=')
|
24
28
|
@config.send method_sym, *args
|
25
|
-
elsif method_sym == :clear
|
29
|
+
elsif method_sym == :clear || method_sym == :delete_all
|
26
30
|
@config = OpenStruct.new
|
27
31
|
else
|
28
32
|
nil
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yaml-ostruct
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-10-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: hashugar
|