Class: Rome2rio::TransitLine

Inherits:
Object
  • Object
show all
Defined in:
lib/rome2rio/response/transit_line.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ TransitLine

Returns a new instance of TransitLine.



4
5
6
7
8
9
10
11
# File 'lib/rome2rio/response/transit_line.rb', line 4

def initialize(json)
  @name = json["name"]
  @vehicle = json["vehicle"]
  @code = json["code"]
  @agency = json["agency"]
  @frequency = json["frequency"]
  @duration = json["duration"]
end

Instance Attribute Details

#agencyObject (readonly)

Returns the value of attribute agency.



3
4
5
# File 'lib/rome2rio/response/transit_line.rb', line 3

def agency
  @agency
end

#codeObject (readonly)

Returns the value of attribute code.



3
4
5
# File 'lib/rome2rio/response/transit_line.rb', line 3

def code
  @code
end

#durationObject (readonly)

Returns the value of attribute duration.



3
4
5
# File 'lib/rome2rio/response/transit_line.rb', line 3

def duration
  @duration
end

#frequencyObject (readonly)

Returns the value of attribute frequency.



3
4
5
# File 'lib/rome2rio/response/transit_line.rb', line 3

def frequency
  @frequency
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/rome2rio/response/transit_line.rb', line 3

def name
  @name
end

#vehicleObject (readonly)

Returns the value of attribute vehicle.



3
4
5
# File 'lib/rome2rio/response/transit_line.rb', line 3

def vehicle
  @vehicle
end