phantom-object 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +7 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16b28dc4e4cc2b20f2c12fd9241fe19ceacc306d
|
4
|
+
data.tar.gz: db15403154d47df05fe768f850a732129d78bc9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: caa6a60ac690a548ee631c1342b92f666d3817c991e6700e8d84821a27611d420853244b4fe9b43b8ebf76a2c947ed485273f54407c3d3020f534fa5dad4089b
|
7
|
+
data.tar.gz: 3f298aa86a9ddf3765992d474ffb7d1e3f3f4e229b5f72f961cf076dbb867eabc5219307697d58efaf476731280fc7ff212c67e0a4b035a44c1f1c23cbb0544f
|
data/README.rdoc
CHANGED
@@ -15,10 +15,10 @@ Now you can do this
|
|
15
15
|
|
16
16
|
o = PhantomObject.new(h)
|
17
17
|
|
18
|
-
p
|
19
|
-
# => "Some value"
|
20
|
-
p h.another_key
|
18
|
+
p o.key
|
21
19
|
# => "Some value"
|
20
|
+
p o.another_key
|
21
|
+
# => "Another value"
|
22
22
|
|
23
23
|
And even this
|
24
24
|
|
@@ -30,7 +30,7 @@ And even this
|
|
30
30
|
|
31
31
|
o = PhantomObject.new(h)
|
32
32
|
|
33
|
-
p
|
33
|
+
p o.nested.key
|
34
34
|
# => "Some value"
|
35
35
|
|
36
36
|
For any level, and with arrays
|
@@ -44,9 +44,9 @@ And also you can do this, instead of PhantomObject.new()
|
|
44
44
|
|
45
45
|
o = h.to_object
|
46
46
|
|
47
|
-
p
|
48
|
-
# => "Some value"
|
49
|
-
p h.another_key
|
47
|
+
p o.key
|
50
48
|
# => "Some value"
|
49
|
+
p o.another_key
|
50
|
+
# => "Another value"
|
51
51
|
|
52
52
|
Also, PhantomObject includes ActiveModel, and you can extend it to use validations, form builders, etc.
|