Method: IERail#stations

Defined in:
lib/ierail.rb

#stationsObject

Get ALL the stations! Returns array of Station objects, and each object responds to {

  obj#name =>"Belfast Central", 
  obj#location =>["-5.91744", "54.6123"] 
  obj#code =>"BFSTC", 
  obj#id =>"228"
}

Returns empty array if no data, but that would be odd.



72
73
74
75
76
77
78
79
# File 'lib/ierail.rb', line 72

def stations
  ier = IERailGet.new("getAllStationsXML?", "arrayofobjstation", "objstation")
  retval = []
  ier.response.each do |s|
    retval << Station.new(s)
  end
  retval
end