pricing_observer 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pricing_observer/version.rb +1 -1
- data/lib/pricing_observer.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: 265e3065c12006d412c3ee85b2faac8d83e2f6cc
|
4
|
+
data.tar.gz: a0845ab079c5dd33219e711e29744088fea80e42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40ad566b733e773a0ea5ee2381af960598a303ef5b92c9f3157e2367f2176ef145d2b94ab0fea977068bd1e50361a3ec78fefc4cfbf9308317e9233ab68daaa9
|
7
|
+
data.tar.gz: 596296c67570eaf294f3e91a674a8a3a8f461c277dd341d95930f83a6b70362c375d9bc4dffeee4cb520b95094adb3896702ce539f182d7aec404b9b8dade8fd
|
data/lib/pricing_observer.rb
CHANGED
@@ -38,7 +38,7 @@ class Pricing
|
|
38
38
|
products.each do |prod|
|
39
39
|
prod.price = 12
|
40
40
|
puts(prod.hit.inspect)
|
41
|
-
|
41
|
+
case prod.hit
|
42
42
|
when 1
|
43
43
|
prod.offerPrice = prod.offerPrice + (prod.offerPrice/50)
|
44
44
|
when 2
|
@@ -61,7 +61,7 @@ class Pricing
|
|
61
61
|
prod.offerPrice = prod.offerPrice - (prod.offerPrice/60)
|
62
62
|
else
|
63
63
|
prod.offerPrice = 5
|
64
|
-
|
64
|
+
end
|
65
65
|
if(prod.offerPrice < 5)
|
66
66
|
prod.offerPrice = 5
|
67
67
|
elsif (prod.offerPrice > 12)
|