store_model 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/store_model/model.rb +11 -2
- data/lib/store_model/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e08694a9eb910d42bd5c9a1f6f2b23746494aad264315e8b7c1de863148fb72
|
4
|
+
data.tar.gz: e5fd75336b9c22c9b75a5de967e2019e54bef594ff7d526fa56dc0ccdac9237e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b229005093bd41076d547b093880954c060623ce2906b782e7e675ae5416b7f27b5876172d16d137d4be33a521449a196f30f170b946df174e4b0732ebad16a1
|
7
|
+
data.tar.gz: 5add920a20c6b2f56121fe360c70f878de2ea194f7a0e5347168a5d9e4f72a7eed660d4966b8b4b0476c57fe90e99425da9b219abc59f7b487a91b21679bbddf
|
data/lib/store_model/model.rb
CHANGED
@@ -36,9 +36,18 @@ module StoreModel
|
|
36
36
|
"#<#{self.class.name} #{attribute_string}>"
|
37
37
|
end
|
38
38
|
|
39
|
-
|
40
|
-
|
39
|
+
delegate :attribute_types, to: :class
|
40
|
+
|
41
|
+
def type_for_attribute(attr_name)
|
42
|
+
attr_name = attr_name.to_s
|
43
|
+
attribute_types[attr_name]
|
44
|
+
end
|
45
|
+
|
46
|
+
# rubocop:disable Naming/PredicateName
|
47
|
+
def has_attribute?(attr_name)
|
48
|
+
attribute_types.key?(attr_name.to_s)
|
41
49
|
end
|
50
|
+
# rubocop:enable Naming/PredicateName
|
42
51
|
|
43
52
|
def unknown_attributes
|
44
53
|
@unknown_attributes ||= {}
|
data/lib/store_model/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: store_model
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DmitryTsepelev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-08-
|
11
|
+
date: 2019-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|