Class: SmartyStreets::USReverseGeo::Result
- Inherits:
-
Object
- Object
- SmartyStreets::USReverseGeo::Result
- Defined in:
- lib/smartystreets_ruby_sdk/us_reverse_geo/result.rb
Overview
A result is a possible match for an geocode that was submitted. A lookup can have multiple results.
See “smartystreets.com/docs/cloud/us-reverse-geo-api#result”
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#coordinate ⇒ Object
readonly
Returns the value of attribute coordinate.
-
#distance ⇒ Object
readonly
Returns the value of attribute distance.
Instance Method Summary collapse
-
#initialize(obj) ⇒ Result
constructor
A new instance of Result.
Constructor Details
#initialize(obj) ⇒ Result
Returns a new instance of Result.
12 13 14 15 16 |
# File 'lib/smartystreets_ruby_sdk/us_reverse_geo/result.rb', line 12 def initialize(obj) @address = Address.new(obj.fetch('address', {})) @coordinate = Coordinate.new(obj.fetch('coordinate', {})) @distance = obj['distance'] end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
10 11 12 |
# File 'lib/smartystreets_ruby_sdk/us_reverse_geo/result.rb', line 10 def address @address end |
#coordinate ⇒ Object (readonly)
Returns the value of attribute coordinate.
10 11 12 |
# File 'lib/smartystreets_ruby_sdk/us_reverse_geo/result.rb', line 10 def coordinate @coordinate end |
#distance ⇒ Object (readonly)
Returns the value of attribute distance.
10 11 12 |
# File 'lib/smartystreets_ruby_sdk/us_reverse_geo/result.rb', line 10 def distance @distance end |