Sha256: 9062069f2de079fee3740601ca863579669f5da26003959ef04847736811e97b
Contents?: true
Size: 642 Bytes
Versions: 1
Compression:
Stored size: 642 Bytes
Contents
module Ratis class Itinerary attr_accessor :co2_auto, :co2_transit, :final_walk_dir, :legs, :reduced_fare, :regular_fare, :transit_time, :trace_info def initialize(response) @co2_auto = response[:co2auto].to_f @co2_transit = response[:co2transit].to_f @final_walk_dir = response[:finalwalkdir] @reduced_fare = response[:reducedfare].to_f @regular_fare = response[:regularfare].to_f @transit_time = response[:transittime].to_i @trace_info = response[:traceinfo] @legs = response.to_array(:legs, :leg).map { |l| Hashie::Mash.new l } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ratis-3.6.3 | lib/ratis/itinerary.rb |