Module: OCTranspo::StopResource
- Extended by:
- StopResource
- Includes:
- RemoteResourceMethods
- Included in:
- StopResource
- Defined in:
- lib/octranspo/stop_resource.rb
Instance Method Summary collapse
-
#find(options = {}) ⇒ Object
Returns a hash with stop name and number, or nil if the stop was not found.
- #url_for(options = {}) ⇒ Object
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 (={}) decode(read()) end |
#url_for(options = {}) ⇒ Object
16 17 18 |
# File 'lib/octranspo/stop_resource.rb', line 16 def url_for (={}) "http://www.octranspo.com/tps/jnot/From560.oci?from560Code=#{[:number]}" end |