class Rome2rio::TransitHop
Attributes
duration[R]
frequency[R]
indicativePrice[R]
lines[R]
sName[R]
sPos[R]
tName[R]
tPos[R]
Public Class Methods
new(json)
click to toggle source
# File lib/rome2rio/response/transit_hop.rb, line 4 def initialize(json) @sName = json["sName"] @sPos = Position.parse(json["sPos"]) @tName = json["tName"] @tPos = Position.parse(json["tPos"]) @frequency = json["frequency"] @duration = json["duration"] @indicativePrice = IndicativePrice.new(json["indicativePrice"]) @lines = [] json["lines"].each { |line| @lines << TransitLine.new(line) } end