yaml_b_sides 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/yaml_b_sides/associatable.rb +12 -8
- data/lib/yaml_b_sides/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: 9922c18031ff17165443f6fa85b92e2e6a86c7b2
|
4
|
+
data.tar.gz: 30ddcec8a0ebed9db1ce2058bb323a1efb742e69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 136c06907be7c51076e1764d6833725a9d55aa6d8e86102dc43008575071ab8a5d1c48891165faf468eadff9ddd29841845fde8494890c32fe150f8f5e322e71
|
7
|
+
data.tar.gz: 32a19c77b4473cb48f5c4c795ab24d1110b60b46d33543d01551705ef33b02192fc637477e4f90859f3014101e8098ac10341bbf090c107ac00116bacc1621cc
|
@@ -36,15 +36,19 @@ module YamlBSides
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def methodize( association )
|
39
|
-
define_method association.name do
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
39
|
+
define_method association.name do
|
40
|
+
begin
|
41
|
+
self._cached_associations ||= {}
|
42
|
+
|
43
|
+
unless self._cached_associations.has_key? association.name
|
44
|
+
result = association.klass( self ).send( association.action, association.query( self ) )
|
45
|
+
|
46
|
+
self._cached_associations[association.name] = result
|
47
|
+
end
|
48
|
+
self._cached_associations[association.name]
|
49
|
+
rescue YamlBSides::Errors::RecordNotFound => e
|
50
|
+
nil
|
46
51
|
end
|
47
|
-
self._cached_associations[association.name]
|
48
52
|
end
|
49
53
|
end
|
50
54
|
end
|
data/lib/yaml_b_sides/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yaml_b_sides
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Greg Orlov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|