prezzo 0.5.0 → 0.5.1
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.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/prezzo/explainable.rb +1 -1
- data/lib/prezzo/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: 0e9332660f2522054b623e1ba93eb6bce0d543d9
|
|
4
|
+
data.tar.gz: 7abe8f70afd7380d704db3dc114cefc4a71e5328
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aff27c50f0d088a92a1bb8bae5e077c3a662bccf045e4face9f48a4ca9c22bd2b0c64ddbb411695018d440a62fe1159dfc344698b3613ca783bffb148fe89415
|
|
7
|
+
data.tar.gz: 480cb54b37ee78b7428908025b3d580b74c8cd82feed2d47d65fbc50391f6793ff8a5d6771da90d2dc392d22ad753940a7b8543866b173e64cc8bd63648b77af
|
data/README.md
CHANGED
|
@@ -166,7 +166,7 @@ class RidePriceCalculator
|
|
|
166
166
|
end
|
|
167
167
|
```
|
|
168
168
|
|
|
169
|
-
#### ` explain_with` with the `
|
|
169
|
+
#### ` explain_with` with the `recursive: false` option
|
|
170
170
|
|
|
171
171
|
```ruby
|
|
172
172
|
class FooCalculator
|
|
@@ -195,7 +195,7 @@ class QuxCalculator
|
|
|
195
195
|
|
|
196
196
|
composed_by foo: FooCalculator
|
|
197
197
|
|
|
198
|
-
explain_with :foo,
|
|
198
|
+
explain_with :foo, recursive: false
|
|
199
199
|
|
|
200
200
|
def calculate
|
|
201
201
|
foo + 5
|
data/lib/prezzo/explainable.rb
CHANGED
|
@@ -30,7 +30,7 @@ module Prezzo
|
|
|
30
30
|
if self.class.respond_to?(:components) && self.class.components.include?(component)
|
|
31
31
|
value = cached_components[component]
|
|
32
32
|
end
|
|
33
|
-
value = value.explain if value.respond_to?(:explain) && options.fetch(:
|
|
33
|
+
value = value.explain if value.respond_to?(:explain) && options.fetch(:recursive, true)
|
|
34
34
|
value = value.calculate if value.respond_to?(:calculate)
|
|
35
35
|
explanation[:components][component] = value
|
|
36
36
|
end
|
data/lib/prezzo/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: prezzo
|
|
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
|
- Marcelo Boeira
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-07-
|
|
11
|
+
date: 2017-07-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: hanami-validations
|