Sha256: 63b7accbcb7ceea4da7e7f769e3876a89de8c59e7b145aa1778040eb786509de

Contents?: true

Size: 1.54 KB

Versions: 13

Compression:

Stored size: 1.54 KB

Contents

require 'savon'
require 'ostruct'

require 'ratis/closest_stop'
require 'ratis/config'
require 'ratis/core_ext'
require 'ratis/errors'
require 'ratis/itinerary'
require 'ratis/landmark'
require 'ratis/landmark_category'
require 'ratis/location'
require 'ratis/next_bus'
require 'ratis/next_bus2'
require 'ratis/pattern'
require 'ratis/pattern/routeinfo'
require 'ratis/point_2_point'
require 'ratis/point_2_point/group'
require 'ratis/point_2_point/routes_only_response'
require 'ratis/point_2_point/service'
require 'ratis/point_2_point/standard_response'
require 'ratis/point_2_point/stop'
require 'ratis/point_2_point/trip'
require 'ratis/request'
require 'ratis/route'
require 'ratis/route_pattern'
require 'ratis/route_pattern/stop'
require 'ratis/route_pattern/point'
require 'ratis/route_stops'
require 'ratis/route_stops/stop'
require 'ratis/schedule_nearby'
require 'ratis/stop'
require 'ratis/timetable'
require 'ratis/timetable/stop'
require 'ratis/timetable/trip'
require 'ratis/walk'
require 'ratis/area'

module Ratis

  extend self

  def configure
    yield config
  end

  def config
    @config ||= Config.new
  end

  def valid_latitude?(lat)
    -90.0 <= lat.to_f and lat.to_f <= 90.0
  end

  def valid_longitude?(lon)
    -180.0 <= lon.to_f and lon.to_f <= 180.0
  end

  def all_conditions_used?(conditions)
    raise ArgumentError.new("Conditions not used by this class: #{conditions.keys.inspect}") unless conditions.empty?
  end

  # null out the config so that it can be rewritten to, then used in new 'get' calls
  def reset
    @config = nil
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ratis-3.3.3 lib/ratis.rb
ratis-3.3.2 lib/ratis.rb
ratis-3.3.1 lib/ratis.rb
ratis-3.3.0 lib/ratis.rb
ratis-3.2.1 lib/ratis.rb
ratis-3.2.0 lib/ratis.rb
ratis-3.1.8 lib/ratis.rb
ratis-3.1.7 lib/ratis.rb
ratis-3.1.6 lib/ratis.rb
ratis-3.1.5.1 lib/ratis.rb
ratis-3.1.5 lib/ratis.rb
ratis-3.1.4 lib/ratis.rb
ratis-3.1.3 lib/ratis.rb