From b5411e6960199b406a3aafaef3ef4d2e09d925f8 Mon Sep 17 00:00:00 2001 From: Bob Maerten Date: Wed, 14 Nov 2018 12:53:07 +0100 Subject: [PATCH] Update readme with an example to use gem in app --- README.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6eebd71..26f41af 100644 --- a/README.md +++ b/README.md @@ -6,18 +6,26 @@ calculators. ## Usage -Install the gem : +Install the gem: - $ gem install chronopost_fuel_multiplier + $ gem install chronopost_fuel_adjustment_coefficients -Run the gem : +Run the gem: - $ chronopost_fuel_multiplier + $ chronopost_fuel_adjustment_coefficients -Get the result : +Get the result: # Fuel multipliers for 'FĂ©vrier 2017' # Fetched from http://www.chronopost.fr/fr/surcharge-carburant AIR_FUEL_MULTIPLIER = 1.1685 ROAD_FUEL_MULTIPLIER = 1.1150 + +Or use it in your app: + + require 'chronopost_fuel_adjustment_coefficients' + + ch = ChronopostFuelAdjustmentCoefficients.new + ch.road_multiplier # 0.11685e1 + ch.air_multiplier # 0.1115e1