module WMATA

Public Class Methods

api() click to toggle source
# File lib/ruby_wmata.rb, line 9
def self.api
  @api || raise("please set the api key")
end
api=(api_key) click to toggle source
# File lib/ruby_wmata.rb, line 13
def self.api=(api_key)
  @client = Client.new(api_key)
  @api = api_key
end
client() click to toggle source
# File lib/ruby_wmata.rb, line 5
def self.client
  @client ||= Client.new(api)
end
next_trains(station = "A06") click to toggle source
# File lib/ruby_wmata.rb, line 18
def self.next_trains(station = "A06")
  client.next_trains(station)
end
train_incidents() click to toggle source
# File lib/ruby_wmata.rb, line 30
def self.train_incidents
  client.train_incidents
end
train_path(from,to) click to toggle source
# File lib/ruby_wmata.rb, line 26
def self.train_path(from,to)
  client.train_path(from,to)
end
train_stations(line = 'RD') click to toggle source
# File lib/ruby_wmata.rb, line 22
def self.train_stations(line = 'RD')
  client.train_stations(line)
end