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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e4024e503a6013386b6152eca67b153e8a589142
4
- data.tar.gz: 9b05c3ae7a3ad5726a0242625f3b344380b1012d
3
+ metadata.gz: a6d595599ef2ab2da1e457770f5a080d60ce8ef6
4
+ data.tar.gz: 1350aba6ab0a552f9b7bd13f60cf3daaad291dfd
5
5
  SHA512:
6
- metadata.gz: bd6769df51690e9b383e6796e87074a8f0876501fc651aa5678079bfa42e004a94a6452de3da3887bf66e7327b51a338ac98f51ee5fa8a391fa2d3fc8deafb18
7
- data.tar.gz: f9b61e71600dc736a463c660623f60d5b23bbbbe1d04b8420a2ace0a4fa9aac2ae6220135f6da8c9aa25139e8381863dcc31b9c318e817ef0bd5a75bb868a137
6
+ metadata.gz: 21cb5ea02de8a0027f72d4833e88fbc94ff239dff8af5b5a14e92ff99938c22d8e7eb16bafb02f31c8b544b931779ccd43bbb713cb9fd12a604d1118170def08
7
+ data.tar.gz: aebcd652babb7d9b7b9a1c6c7c2ff27654da948d99643713dff217d1508d52df78d409b49d5aeae1d5328b62ac59d386a0454b9c46ffa772a82715f9676e4c54
@@ -1,7 +1,17 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.3.1
4
+ - 2.3.3
5
+ - 2.4.0
6
+ - ruby-head
7
+ - jruby-9.1.7.0
8
+ - jruby-head
9
+
10
+ matrix:
11
+ allow_failures:
12
+ - rvm: 2.4.0
13
+ - rvm: ruby-head
14
+ - rvm: jruby-head
5
15
 
6
16
  addons:
7
17
  code_climate:
@@ -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
- @@__calculators[name] = klass
12
+ options[name] = klass
15
13
 
16
14
  define_method(name) do
17
- @@__calculators[name].new(context).calculate
15
+ options[name].new(context).calculate
18
16
  end
19
17
  end
20
18
  end
@@ -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
- @@_methods.each do |method|
14
+ options.each do |method|
17
15
  explanation[method] = send(method)
18
16
  end
19
17
 
@@ -1,3 +1,3 @@
1
1
  module Prezzo
2
- VERSION = "0.2.1".freeze
2
+ VERSION = "0.2.2".freeze
3
3
  end
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.1
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-02-27 00:00:00.000000000 Z
11
+ date: 2017-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hanami-validations