Module: OCTranspo::StopResource

Extended by:
StopResource
Includes:
RemoteResourceMethods
Included in:
StopResource
Defined in:
lib/octranspo/stop_resource.rb

Instance Method Summary collapse

Methods included from RemoteResourceMethods

#cache, #cache_path, #cache_path_for, #create_fixture, #fixture_path_for, #fixtures_path, #logger, #read, #read_from_cache, #read_from_fixture, #read_from_remote, #reset!, #site, #use_fixtures!

Instance Method Details

#find(options = {}) ⇒ Object

Returns a hash with stop name and number, or nil if the stop was not found.



12
13
14
# File 'lib/octranspo/stop_resource.rb', line 12

def find (options={})
  decode(read(options))
end

#url_for(options = {}) ⇒ Object



16
17
18
# File 'lib/octranspo/stop_resource.rb', line 16

def url_for (options={})
  "http://www.octranspo.com/tps/jnot/From560.oci?from560Code=#{options[:number]}"
end