cash_register 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cash_register/deals.rb +5 -3
- data/lib/cash_register/promotions.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a4744d93e1d16cd07ab61f60f62114d07017061
|
4
|
+
data.tar.gz: dd33f6a425548922830a310dba18872cd18ba456
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 209a32e2b19a1a3ba28dcd7a95d72cb7eb9e3f686abf9ec779b2b21bc0ba032264ede494f8b57baf80cd16385c9abed636d2c56df4ea726b91db5b2b10fcecce
|
7
|
+
data.tar.gz: 34a53f46108707a4665f0dd9ee6a23835524f9b3dff3f61a287560f3ad2bca27b387d26d52bccd426aaabe25f87b62e5e00a3696fe155336bbb33dc7e124198c
|
data/lib/cash_register/deals.rb
CHANGED
@@ -11,11 +11,11 @@ module CashRegister
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def is_two_for_one?(code = '')
|
14
|
-
(@promotions['TWO_FOR_ONE_FREE']
|
14
|
+
(@promotions['TWO_FOR_ONE_FREE'] rescue []).include?(code)
|
15
15
|
end
|
16
16
|
|
17
17
|
def is_discount?(code = '')
|
18
|
-
(@promotions['DISCOUNT']
|
18
|
+
(@promotions['DISCOUNT'] rescue []).include?(code)
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|