floor_calculator 0.2.0 → 0.2.1

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: 525994f2058fc47b37d0a407c86bf5e7e3f0694f
4
- data.tar.gz: 7205f4ae35e4c5058177d4b0c65e27046593bb56
3
+ metadata.gz: b90b6a038e8128138c7eaac833de24f11a6aa3c0
4
+ data.tar.gz: bb0a71604bfbfe1e830582eb6f739aeebe1a7ea5
5
5
  SHA512:
6
- metadata.gz: 04f99fe1af0ca40e9e6a3f4a7bd370f302892796e2b8f35bb418ec891d6e07fea8bd59fcb2aceac2bc1fa245c6eec20b04125e0881b6c625c7724a08fafba419
7
- data.tar.gz: 9a226d3dcf581e8e4b5981533b1fa95332d29a62a9eaff9f196b630f86ef63d3bdaf2c5687fb9d5ad535ae90a8e4c28efbb5d86dbbefbef8a8a4cd836534b5c5
6
+ metadata.gz: 46e130393515b235022765881e11ed5926f279591843a43308b5caccbcd7e1ded87b91a45aa765101b8b9b8562ceefec42ae00434050b16374a9f051024543b5
7
+ data.tar.gz: 640adb6ed441cfb9e5d742519d59d70990015aba1ed8a2d248523d4a4987e49a9014c362817dd7301f2757e9ce94a77433f6018d0221ab09c601ccfcaf636055
@@ -16,8 +16,9 @@ module FloorCalculator
16
16
  end
17
17
 
18
18
  def calculate_floor
19
- floor = COST_METHODS.each_with_object(offer.price) do |method, price|
20
- public_send(method, prepare_options(offer, price))
19
+ floor = offer.price
20
+ COST_METHODS.each do |method|
21
+ floor = public_send(method, prepare_options(offer, floor))
21
22
  end
22
23
  round_to_20s(floor.fractional)
23
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: floor_calculator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marek Mikołajczyk