discounter 0.0.2 → 0.0.3
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/lib/discounter/discount.rb +7 -7
- data/lib/discounter/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 701bc455a0eacac9b4bc0d27abcd0cb860e98e52
|
|
4
|
+
data.tar.gz: b3ddd6288f47ccd8e401e4c4d93a30faa0ea0314
|
|
5
5
|
!binary "U0hBNTEy":
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 14fe5d064a76069c4c09157a10de1d3e5de12b41a6dbf6e4f4b7593fa2f7c9229f8bbc523914dc84fb17806c0b9eb18747a47012d0c455ac1ea3c9706099a11e
|
|
7
|
+
data.tar.gz: 19e3efe0b5bd84d673459b06bdee5551851d5e50aac41ed6070f4f0ae5c75547393caad5538a1640f7da1c2e1927f0cc18ab0f629322e51d60b13ced47a8ea30
|
data/lib/discounter/discount.rb
CHANGED
|
@@ -9,15 +9,15 @@ class Discounts
|
|
|
9
9
|
# Make this dynamic, allow users to pass in as many
|
|
10
10
|
# discount percentages as they want. Increment by one.
|
|
11
11
|
DISCOUNTS = {
|
|
12
|
-
'pretty_discounts'
|
|
13
|
-
'Tier 1'
|
|
14
|
-
'Tier 2'
|
|
15
|
-
'Tier 3'
|
|
12
|
+
'pretty_discounts' => {
|
|
13
|
+
'Tier 1' => @tier_1,
|
|
14
|
+
'Tier 2' => @tier_2,
|
|
15
|
+
'Tier 3' => @tier_3
|
|
16
16
|
},
|
|
17
17
|
|
|
18
|
-
'tier_1'
|
|
19
|
-
'tier_2'
|
|
20
|
-
'tier_3'
|
|
18
|
+
'tier_1' => (@tier_1 * 0.01),
|
|
19
|
+
'tier_2' => (@tier_2 * 0.01),
|
|
20
|
+
'tier_3' => (@tier_3 * 0.01)
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
# Instance based query method.
|
data/lib/discounter/version.rb
CHANGED