class KVVLiveAPI::Stop
Instances of this class represent a stop operated by the KVV
Attributes
lat[R]
latitute of the location of the stop
lon[R]
longitude of the location of the stop
name[R]
Name of the stop
stop_id[R]
ID used to reference the stop
Public Class Methods
from_json(json)
click to toggle source
# File lib/kvvliveapi/stop.rb, line 6 def from_json(json) new(json['name'], json['id'], json['lat'], json['lon']) end
new(name, stop_id, lat, lon)
click to toggle source
# File lib/kvvliveapi/stop.rb, line 23 def initialize(name, stop_id, lat, lon) @name = name @stop_id = stop_id @lat = lat @lon = lon end
Public Instance Methods
to_s()
click to toggle source
# File lib/kvvliveapi/stop.rb, line 30 def to_s @name + '(' + @stop_id.to_s + ')' end