Sha256: 038e8c2f26e7f3968a4e5586da936168167cb9d57485b6a74deab6aa844890ce

Contents?: true

Size: 1.11 KB

Versions: 14

Compression:

Stored size: 1.11 KB

Contents

module Ratis
  class Stop
    attr_accessor :latitude, :longitude, :area, :walk_dir, :stop_position, :description,
                  :route_dirs, :walk_dist, :side, :stop_id, :heading, :atis_stop_id

    alias_method :lat, :latitude
    alias_method :lng, :longitude

    # :description=>"JEFFERSON STREET/1ST AVE LIGHT RAIL STN", :area=>"Phoenix", :stopid=>"10013", :atisstopid=>"10891",
    # :lat=>"33.448188", :long=>"-112.075198", :walkdist=>"0.08", :walkdir=>"S", :stopposition=>"O", :heading=>"NB", :side=>"Far", :routedirs=>{:routedir=>"LTRL-E"}

    def initialize(params)
      @description   = params[:description]
      @area          = params[:area]
      @stop_id       = params[:stopid]
      @atis_stop_id  = params[:atisstopid]
      @latitude      = params[:lat]
      @longitude     = params[:long]
      @walk_dist     = params[:walkdist]
      @walk_dir      = params[:walkdir]
      @stop_position = params[:stopposition]
      @heading       = params[:heading]
      @side          = params[:side]
      @route_dirs    = params[:routedirs]
    end

    def route_dir
      @route_dirs[:routedir]
    end
  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ratis-3.6.6 lib/ratis/stop.rb
ratis-3.6.5 lib/ratis/stop.rb
ratis-3.6.4 lib/ratis/stop.rb
ratis-3.6.3 lib/ratis/stop.rb
ratis-3.6.2 lib/ratis/stop.rb
ratis-3.6.1 lib/ratis/stop.rb
ratis-3.6.0 lib/ratis/stop.rb
ratis-3.5.0 lib/ratis/stop.rb
ratis-3.4.3 lib/ratis/stop.rb
ratis-3.4.2 lib/ratis/stop.rb
ratis-3.4.1 lib/ratis/stop.rb
ratis-3.4.0 lib/ratis/stop.rb
ratis-3.3.7 lib/ratis/stop.rb
ratis-3.3.6 lib/ratis/stop.rb