prezzo 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/lib/prezzo/{composed.rb → composable.rb} +1 -1
- data/lib/prezzo/version.rb +1 -1
- data/lib/prezzo.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: 9af9f24859a60396c7f48e972a3a36c453382360
|
4
|
+
data.tar.gz: 937a2421233e647e8b758169c7588a9b87b891b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 008e44da537208b6060485e844470f21810f28a3e206662c13259ab3f5344e1a3f8b799eb923130bfdbf77d7117bf8f586ced21d73d51e0de40c7809a65f63b5
|
7
|
+
data.tar.gz: b82ce4d189395a76ffe3588dc186de7611c23452d572213f6972ff7b78f2809e22f1d7c5c559a60663eab9d36b03a9fe863c23f56c8382e9a9b9ddd8cae490dc
|
data/README.md
CHANGED
@@ -95,9 +95,9 @@ Uber::PricePerDistanceCalculator.new(context).calculate
|
|
95
95
|
|
96
96
|
If you initialize the context with a hash, it will skip the validation, however, any object that responds to `.valid?` will attempt a validation, and it will fail if valid? returns false.
|
97
97
|
|
98
|
-
### Prezzo::
|
98
|
+
### Prezzo::Composable
|
99
99
|
|
100
|
-
The `Prezzo::
|
100
|
+
The `Prezzo::Composable` module is an abstraction that provides a nice way of injecting other calculators define how the price will be composed with all of those calculators.
|
101
101
|
|
102
102
|
e.g.:
|
103
103
|
|
@@ -107,7 +107,7 @@ require "prezzo"
|
|
107
107
|
module Uber
|
108
108
|
class RidePriceCalculator
|
109
109
|
include Prezzo::Calculator
|
110
|
-
include Prezzo::
|
110
|
+
include Prezzo::Composable
|
111
111
|
|
112
112
|
composed_by base_fare: BaseFareCalculator,
|
113
113
|
price_per_distance: PricePerDistanceCalculator,
|
@@ -135,7 +135,7 @@ require "prezzo"
|
|
135
135
|
module Uber
|
136
136
|
class RidePriceCalculator
|
137
137
|
include Prezzo::Calculator
|
138
|
-
include Prezzo::
|
138
|
+
include Prezzo::Composable
|
139
139
|
include Prezzo::Explainable
|
140
140
|
|
141
141
|
composed_by base_fare: BaseFareCalculator,
|
data/lib/prezzo/version.rb
CHANGED
data/lib/prezzo.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prezzo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcelo Boeira
|
@@ -159,7 +159,7 @@ files:
|
|
159
159
|
- bin/setup
|
160
160
|
- lib/prezzo.rb
|
161
161
|
- lib/prezzo/calculator.rb
|
162
|
-
- lib/prezzo/
|
162
|
+
- lib/prezzo/composable.rb
|
163
163
|
- lib/prezzo/context.rb
|
164
164
|
- lib/prezzo/explainable.rb
|
165
165
|
- lib/prezzo/version.rb
|