Class: DataScienceTheater3000::Street2Coordinates
- Inherits:
-
Object
- Object
- DataScienceTheater3000::Street2Coordinates
- Defined in:
- lib/data_science_theater_3000/street2coordinates.rb
Instance Attribute Summary collapse
- #address ⇒ Object private
Instance Method Summary collapse
-
#initialize(address) ⇒ Street2Coordinates
constructor
Converts a street address into a location hash.
- #result ⇒ Hash
Constructor Details
#initialize(address) ⇒ Street2Coordinates
Converts a street address into a location hash
11 12 13 14 |
# File 'lib/data_science_theater_3000/street2coordinates.rb', line 11 def initialize address @address = CGI::escape(address) if address.is_a?(String) @address = ActiveSupport::JSON.encode(address.map!{|a|CGI::escape(a)}) if address.is_a?(Array) end |
Instance Attribute Details
#address ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
5 6 7 |
# File 'lib/data_science_theater_3000/street2coordinates.rb', line 5 def address @address end |
Instance Method Details
#result ⇒ Hash
18 19 20 |
# File 'lib/data_science_theater_3000/street2coordinates.rb', line 18 def result dst_request.result end |