prezzo 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +11 -1
- data/lib/prezzo/composed.rb +2 -4
- data/lib/prezzo/explainable.rb +1 -3
- 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: a6d595599ef2ab2da1e457770f5a080d60ce8ef6
|
4
|
+
data.tar.gz: 1350aba6ab0a552f9b7bd13f60cf3daaad291dfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21cb5ea02de8a0027f72d4833e88fbc94ff239dff8af5b5a14e92ff99938c22d8e7eb16bafb02f31c8b544b931779ccd43bbb713cb9fd12a604d1118170def08
|
7
|
+
data.tar.gz: aebcd652babb7d9b7b9a1c6c7c2ff27654da948d99643713dff217d1508d52df78d409b49d5aeae1d5328b62ac59d386a0454b9c46ffa772a82715f9676e4c54
|
data/.travis.yml
CHANGED
data/lib/prezzo/composed.rb
CHANGED
@@ -8,13 +8,11 @@ module Prezzo
|
|
8
8
|
|
9
9
|
module ClassMethods
|
10
10
|
def composed_by(options)
|
11
|
-
@@__calculators = {}
|
12
|
-
|
13
11
|
options.each do |name, klass|
|
14
|
-
|
12
|
+
options[name] = klass
|
15
13
|
|
16
14
|
define_method(name) do
|
17
|
-
|
15
|
+
options[name].new(context).calculate
|
18
16
|
end
|
19
17
|
end
|
20
18
|
end
|
data/lib/prezzo/explainable.rb
CHANGED
@@ -8,12 +8,10 @@ module Prezzo
|
|
8
8
|
|
9
9
|
module ClassMethods
|
10
10
|
def explain_with(*options)
|
11
|
-
@@_methods = options
|
12
|
-
|
13
11
|
define_method(:explain) do
|
14
12
|
explanation = {}
|
15
13
|
|
16
|
-
|
14
|
+
options.each do |method|
|
17
15
|
explanation[method] = send(method)
|
18
16
|
end
|
19
17
|
|
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.2.
|
4
|
+
version: 0.2.2
|
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-
|
11
|
+
date: 2017-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hanami-validations
|