storext 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/storext/class_methods.rb +8 -0
- data/lib/storext/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: 80d98a4230700de78ec010083fb502a53c9cb9cd
|
4
|
+
data.tar.gz: bb9518e63fd7681d8b6b46e9317f8271a39efd20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6aa6716b442fba708f71693412779a4bede8eab35aea283af194ca71cfbb8714e34fdd3af7502b988e8af8a8aacfa5896a7bf3e7d0f80b2dfb8d7972f5245475
|
7
|
+
data.tar.gz: b3bc66b25ae5fa34a2aae1e6381fb4da4c8a65e7f9c42d931e2ba50f41d8fe5ef08629dcbdac5831cbf46a83a48244b4c3a852f3a7a82d4f515bc4a3b7f6eb38
|
@@ -21,6 +21,13 @@ module Storext
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
+
def storext_define_predicater(column, attr)
|
25
|
+
define_method "#{attr}?" do
|
26
|
+
return false unless send(column) && send(column).has_key?(attr.to_s)
|
27
|
+
!!read_store_attribute(column, attr)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
24
31
|
def store_attribute(column, attr, type=nil, opts={})
|
25
32
|
track_store_attribute(column, attr, type, opts)
|
26
33
|
storext_check_attr_validity(attr, type, opts)
|
@@ -31,6 +38,7 @@ module Storext
|
|
31
38
|
def storext_define_accessor(column, attr)
|
32
39
|
storext_define_writer(column, attr)
|
33
40
|
storext_define_reader(column, attr)
|
41
|
+
storext_define_predicater(column, attr)
|
34
42
|
storext_define_proxy_attribute(attr)
|
35
43
|
end
|
36
44
|
|
data/lib/storext/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: storext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- G5
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-
|
13
|
+
date: 2016-08-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|