model_pack 0.9.8 → 0.9.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/model_pack/class_methods.rb +2 -1
- data/lib/model_pack/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c1af401362eadd275703307aa2eb0da1bb5a5cf
|
4
|
+
data.tar.gz: 61bfb74ee44ea86622cff233813c3842569a0ca0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68f387d15f4b67a4da2ef6cd164a10928afd9b55aed1fe504d9c9297c3af790eb75df614a6f77f9cc3e8d7eef913872ecf288f0eeffce7f4444be0abb8a52dc1
|
7
|
+
data.tar.gz: 0c8ac45bfc9de6c78010129b30858c4b937297c3c4ec390c92b096bb55925d90bb011d1e9df8235e02b4aafa29d0226112d8bcfd99d3121a54cecb80bec7d9b3
|
@@ -33,11 +33,12 @@ module ModelPack
|
|
33
33
|
end if serialize
|
34
34
|
end
|
35
35
|
|
36
|
-
def object(name, class_name: nil, default: nil, serialize: nil, predicate: nil)
|
36
|
+
def object(name, class_name: nil, default: nil, as: nil, serialize: nil, predicate: nil)
|
37
37
|
attribute(name,
|
38
38
|
default: default,
|
39
39
|
serialize: serialize,
|
40
40
|
predicate: predicate,
|
41
|
+
as: as,
|
41
42
|
writer: lambda { |v| v.is_a?(Hash) && class_name ? class_name.new(v) : v })
|
42
43
|
end
|
43
44
|
|
data/lib/model_pack/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: model_pack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- inre
|
@@ -96,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
96
|
version: 2.3.0
|
97
97
|
requirements: []
|
98
98
|
rubyforge_project:
|
99
|
-
rubygems_version: 2.4.
|
99
|
+
rubygems_version: 2.4.6
|
100
100
|
signing_key:
|
101
101
|
specification_version: 4
|
102
102
|
summary: Model Pack – simple models
|