ostruct_deep 0.1.4 → 0.1.5
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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 20b2dff042c06561bf548cf8a79549fd23ddd139
|
|
4
|
+
data.tar.gz: c2c95f122d344302da92ce41cbb5ce1495dd0d1d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cde515672abb8649f6653ab87cbfbe1e1ce15db5c08fe838aab22cb3004965fdde1b02f5b9cfbcd39d8cf619c3c9c597d3f628fed0dd323fc04a5a064ad5b9f8
|
|
7
|
+
data.tar.gz: ef2de07b50dc3368bc11dd8d24f4be460c7853fdcb1327e41b9847ea773bec68b6336bca3c6711f8be4659bf9444aa116207898591d10bcd1c26f0f7ea301d7c
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -51,16 +51,16 @@ puts person.address # -> nil
|
|
|
51
51
|
#### <Hash obj>.to_ostruct_deep
|
|
52
52
|
- return : object of OpenStructDeep
|
|
53
53
|
```ruby
|
|
54
|
-
hash = {name: "John Smith", age: 70, pension: 300}
|
|
55
|
-
hash.to_ostruct_deep # ->
|
|
54
|
+
hash = {name: "John Smith", age: 70, pension: 300, friends: ["Pablov", "Harry", "Peter"]}
|
|
55
|
+
hash.to_ostruct_deep # -> <OpenStructDeep name="John Smith", age=70, pension=300, friends=["Pablov", "Harry", "Peter"]>
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
#### <OpenStructDeep obj>.to_h
|
|
59
59
|
- return : object of hash
|
|
60
60
|
```ruby
|
|
61
|
-
hash = {name: "John Smith", age: 70, pension: 300}
|
|
62
|
-
osd = OpenStructDeep.new(hash) # -> <OpenStructDeep name="John Smith", age=70, pension=300>
|
|
63
|
-
osd.to_h # -> {:name=>"John Smith", :age=>70, :pension=>300}
|
|
61
|
+
hash = {name: "John Smith", age: 70, pension: 300, friends: ["Pablov", "Harry", "Peter"]}
|
|
62
|
+
osd = OpenStructDeep.new(hash) # -> <OpenStructDeep name="John Smith", age=70, pension=300, friends=["Pablov", "Harry", "Peter"]>
|
|
63
|
+
osd.to_h # -> {:name=>"John Smith", :age=>70, :pension=>300, :friends=>["Pablov", "Harry", "Peter"]}
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
## What's new?
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ostruct_deep
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Fred Kim
|
|
@@ -70,6 +70,7 @@ files:
|
|
|
70
70
|
- bin/console
|
|
71
71
|
- bin/setup
|
|
72
72
|
- lib/open_struct_extend/hash/hash.rb
|
|
73
|
+
- lib/open_struct_extend/json/json.rb
|
|
73
74
|
- lib/open_struct_extend/ostruct_deep.rb
|
|
74
75
|
- lib/open_struct_extend/ostruct_deep/open_struct_deep.rb
|
|
75
76
|
- lib/open_struct_extend/version.rb
|