Class: GeocoderResponse
- Defined in:
- lib/dto/geocoder/geocoder_response.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#latitude ⇒ Object
Returns the value of attribute latitude.
-
#longitude ⇒ Object
Returns the value of attribute longitude.
Class Method Summary collapse
Methods inherited from Struct
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code
1 2 3 |
# File 'lib/dto/geocoder/geocoder_response.rb', line 1 def code @code end |
#errors ⇒ Object
Returns the value of attribute errors
1 2 3 |
# File 'lib/dto/geocoder/geocoder_response.rb', line 1 def errors @errors end |
#latitude ⇒ Object
Returns the value of attribute latitude
1 2 3 |
# File 'lib/dto/geocoder/geocoder_response.rb', line 1 def latitude @latitude end |
#longitude ⇒ Object
Returns the value of attribute longitude
1 2 3 |
# File 'lib/dto/geocoder/geocoder_response.rb', line 1 def longitude @longitude end |
Class Method Details
.from_array(array) ⇒ Object
2 3 4 5 6 |
# File 'lib/dto/geocoder/geocoder_response.rb', line 2 def self.from_array(array) array.collect do |geocode| from_hash(:code => geocode[0], :latitude => geocode[1], :longitude => geocode[2]) end end |