1
0

Fix linter issues

This commit is contained in:
Tim Kächele 2024-08-25 10:11:51 +02:00
parent 6dfaa6946a
commit 862e6d9270
5 changed files with 5 additions and 5 deletions

View File

@ -5,7 +5,7 @@ module PlanetExpressExpress
[:LP, :L] => 6_90,
[:MR, :S] => 2_00,
[:MR, :M] => 3_00,
[:MR, :L] => 4_00,
[:MR, :L] => 4_00
}.freeze
DISCOUNT_LIMIT = 10_00

View File

@ -12,7 +12,7 @@ module PlanetExpressExpress
if shipment[:discount] > available_budget
shipment[:discount] = available_budget
end
available_budget = available_budget - shipment[:discount]
available_budget -= shipment[:discount]
end
end
end

View File

@ -1,7 +1,7 @@
module PlanetExpressExpress
class Rules
def initialize(prices)
@lowest_s_price = prices.select { |k,v| k[1] == :S }.values.min
@lowest_s_price = prices.select { |k, v| k[1] == :S }.values.min
end
def apply_rules(shipments)

View File

@ -1,5 +1,5 @@
module PlanetExpressExpress
require 'date'
require "date"
class ShipmentReader
def initialize(prices)
@prices = prices

View File

@ -16,7 +16,7 @@ RSpec.describe PlanetExpressExpress do
PlanetExpressExpress::Formatter.new(output).format(shipments)
expected_output = File.read(
File.expand_path("../fixtures/output.txt", __FILE__),
File.expand_path("../fixtures/output.txt", __FILE__)
)
output.rewind