Class: FuelSurcharge::Chronopost
- Inherits:
-
Object
- Object
- FuelSurcharge::Chronopost
- Defined in:
- lib/fuel_surcharge/chronopost.rb
Instance Method Summary collapse
- #air_multiplier ⇒ Object
- #air_percentage ⇒ Object
- #road_multiplier ⇒ Object
- #road_percentage ⇒ Object
- #time_period ⇒ Object
- #url ⇒ Object
Instance Method Details
#air_multiplier ⇒ Object
15 16 17 |
# File 'lib/fuel_surcharge/chronopost.rb', line 15 def air_multiplier air_percentage&.to_multiplier end |
#air_percentage ⇒ Object
23 24 25 26 27 28 |
# File 'lib/fuel_surcharge/chronopost.rb', line 23 def air_percentage @air_percentage ||= begin table_row = HTMLScanner.new(air_content).all("td") table_row[1] end end |
#road_multiplier ⇒ Object
19 20 21 |
# File 'lib/fuel_surcharge/chronopost.rb', line 19 def road_multiplier road_percentage&.to_multiplier end |
#road_percentage ⇒ Object
30 31 32 33 34 35 |
# File 'lib/fuel_surcharge/chronopost.rb', line 30 def road_percentage @road_percentage ||= begin table_row = HTMLScanner.new(road_content).all("td") table_row[1] end end |
#time_period ⇒ Object
11 12 13 |
# File 'lib/fuel_surcharge/chronopost.rb', line 11 def time_period periods[1] end |
#url ⇒ Object
37 38 39 |
# File 'lib/fuel_surcharge/chronopost.rb', line 37 def url "https://www.chronopost.fr/fr/surcharge-carburant" end |