Class: Rome2rio::TransitLine
- Inherits:
-
Object
- Object
- Rome2rio::TransitLine
- Defined in:
- lib/rome2rio/response/transit_line.rb
Instance Attribute Summary collapse
-
#agency ⇒ Object
readonly
Returns the value of attribute agency.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#duration ⇒ Object
readonly
Returns the value of attribute duration.
-
#frequency ⇒ Object
readonly
Returns the value of attribute frequency.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#vehicle ⇒ Object
readonly
Returns the value of attribute vehicle.
Instance Method Summary collapse
-
#initialize(json) ⇒ TransitLine
constructor
A new instance of TransitLine.
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
#agency ⇒ Object (readonly)
Returns the value of attribute agency.
3 4 5 |
# File 'lib/rome2rio/response/transit_line.rb', line 3 def agency @agency end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
3 4 5 |
# File 'lib/rome2rio/response/transit_line.rb', line 3 def code @code end |
#duration ⇒ Object (readonly)
Returns the value of attribute duration.
3 4 5 |
# File 'lib/rome2rio/response/transit_line.rb', line 3 def duration @duration end |
#frequency ⇒ Object (readonly)
Returns the value of attribute frequency.
3 4 5 |
# File 'lib/rome2rio/response/transit_line.rb', line 3 def frequency @frequency end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/rome2rio/response/transit_line.rb', line 3 def name @name end |
#vehicle ⇒ Object (readonly)
Returns the value of attribute vehicle.
3 4 5 |
# File 'lib/rome2rio/response/transit_line.rb', line 3 def vehicle @vehicle end |