opinionated 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/opinionated.rb +3 -3
- metadata +4 -4
data/lib/opinionated.rb
CHANGED
@@ -37,7 +37,7 @@ module Reamaze
|
|
37
37
|
<<-EOS
|
38
38
|
def #{preferential}
|
39
39
|
h = Reamaze::Opinionated::PrefHash.new self, "#{preferential}"
|
40
|
-
h.replace self["#{preferential}"]
|
40
|
+
h.replace self["#{preferential}"] if self["#{preferential}"]
|
41
41
|
h
|
42
42
|
end
|
43
43
|
EOS
|
@@ -101,7 +101,7 @@ module Reamaze
|
|
101
101
|
value = definition.preprocess.call(value) if do_preprocess and definition and definition.has_preprocess
|
102
102
|
|
103
103
|
# Invoke the association
|
104
|
-
prefs = ::Hash[self[preferential]
|
104
|
+
prefs = ::Hash[self[preferential]] if self[preferential]
|
105
105
|
|
106
106
|
if prefs.blank?
|
107
107
|
send(preferential + '=', {name => value})
|
@@ -126,7 +126,7 @@ module Reamaze
|
|
126
126
|
definition = configuration.definitions[name]
|
127
127
|
|
128
128
|
# Invoke the association
|
129
|
-
prefs = self[preferential]
|
129
|
+
prefs = self[preferential] if self[preferential]
|
130
130
|
prefs = {} if prefs.blank?
|
131
131
|
|
132
132
|
# Try to find what they are looking for
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opinionated
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Lu Wang
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2013-03-19 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rails
|