Class: SmartyStreets::USReverseGeo::Coordinate
- Inherits:
-
Object
- Object
- SmartyStreets::USReverseGeo::Coordinate
- Defined in:
- lib/smartystreets_ruby_sdk/us_reverse_geo/coordinate.rb
Overview
Instance Attribute Summary collapse
-
#accuracy ⇒ Object
readonly
Returns the value of attribute accuracy.
-
#latitude ⇒ Object
readonly
Returns the value of attribute latitude.
-
#license ⇒ Object
readonly
Returns the value of attribute license.
-
#longitude ⇒ Object
readonly
Returns the value of attribute longitude.
Instance Method Summary collapse
- #get_license ⇒ Object
-
#initialize(obj) ⇒ Coordinate
constructor
A new instance of Coordinate.
Constructor Details
#initialize(obj) ⇒ Coordinate
Returns a new instance of Coordinate.
7 8 9 10 11 12 |
# File 'lib/smartystreets_ruby_sdk/us_reverse_geo/coordinate.rb', line 7 def initialize(obj) @latitude = obj.fetch('latitude', nil) @longitude = obj.fetch('longitude', nil) @accuracy = obj.fetch('accuracy', nil) @license = obj.fetch('license', nil) end |
Instance Attribute Details
#accuracy ⇒ Object (readonly)
Returns the value of attribute accuracy.
5 6 7 |
# File 'lib/smartystreets_ruby_sdk/us_reverse_geo/coordinate.rb', line 5 def accuracy @accuracy end |
#latitude ⇒ Object (readonly)
Returns the value of attribute latitude.
5 6 7 |
# File 'lib/smartystreets_ruby_sdk/us_reverse_geo/coordinate.rb', line 5 def latitude @latitude end |
#license ⇒ Object (readonly)
Returns the value of attribute license.
5 6 7 |
# File 'lib/smartystreets_ruby_sdk/us_reverse_geo/coordinate.rb', line 5 def license @license end |
#longitude ⇒ Object (readonly)
Returns the value of attribute longitude.
5 6 7 |
# File 'lib/smartystreets_ruby_sdk/us_reverse_geo/coordinate.rb', line 5 def longitude @longitude end |
Instance Method Details
#get_license ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/smartystreets_ruby_sdk/us_reverse_geo/coordinate.rb', line 14 def get_license() case @license when 1 return "SmartyStreets Proprietary" else return "SmartyStreets" end end |