operable 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/operable/operations.rb +4 -2
- data/lib/operable/version.rb +1 -1
- metadata +1 -1
data/lib/operable/operations.rb
CHANGED
@@ -12,8 +12,10 @@ module Operable
|
|
12
12
|
|
13
13
|
self.class.new.tap do |o|
|
14
14
|
operable_values.each do |k,v|
|
15
|
-
|
16
|
-
|
15
|
+
our_value = v || 0
|
16
|
+
other_value = other.respond_to?(k) ? other.send(k) : 0
|
17
|
+
|
18
|
+
o.send("#{k}=", our_value.send(method, other_value || 0))
|
17
19
|
end
|
18
20
|
end
|
19
21
|
end
|
data/lib/operable/version.rb
CHANGED