Sha256: dfd0c55b333db5e0231d1a9383181d48dbb81ed0a5ad839fc54be1eb688dd7fc
Contents?: true
Size: 471 Bytes
Versions: 2
Compression:
Stored size: 471 Bytes
Contents
module TflTubeStations class Station attr_accessor :doc, :name, :address, :entrances, :coordinates def initialize(doc) @doc = doc @address = @doc.search("/placemark/description").inner_text.strip @entrances = @doc.search("/entrances/entrance").collect {|x| Entrance.new(x)} @name = @doc.search("/name").inner_text.strip @coordinates = @doc.search("/placemark/point/coordinates").inner_text.strip end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
kalv-tfl-tube-stations-0.1.0 | lib/tfl_tube_stations/station.rb |
kalv-tfl-tube-stations-0.1.1 | lib/tfl_tube_stations/station.rb |