Class: SmartyStreets::USExtract::Address
- Inherits:
-
Object
- Object
- SmartyStreets::USExtract::Address
- Defined in:
- lib/smartystreets_ruby_sdk/us_extract/address.rb
Overview
Instance Attribute Summary collapse
-
#candidates ⇒ Object
readonly
Returns the value of attribute candidates.
-
#end ⇒ Object
readonly
Returns the value of attribute end.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#start ⇒ Object
readonly
Returns the value of attribute start.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
-
#verified ⇒ Object
readonly
Returns the value of attribute verified.
Instance Method Summary collapse
-
#initialize(obj) ⇒ Address
constructor
A new instance of Address.
Constructor Details
#initialize(obj) ⇒ Address
Returns a new instance of Address.
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/smartystreets_ruby_sdk/us_extract/address.rb', line 9 def initialize(obj) @text = obj['text'] @verified = obj['verified'] @line = obj['line'] @start = obj['start'] @end = obj['end'] candidates = obj.fetch('api_output', []) @candidates = [] candidates.each {|candidate| @candidates.push(USStreet::Candidate.new(candidate)) } end |
Instance Attribute Details
#candidates ⇒ Object (readonly)
Returns the value of attribute candidates.
7 8 9 |
# File 'lib/smartystreets_ruby_sdk/us_extract/address.rb', line 7 def candidates @candidates end |
#end ⇒ Object (readonly)
Returns the value of attribute end.
7 8 9 |
# File 'lib/smartystreets_ruby_sdk/us_extract/address.rb', line 7 def end @end end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
7 8 9 |
# File 'lib/smartystreets_ruby_sdk/us_extract/address.rb', line 7 def line @line end |
#start ⇒ Object (readonly)
Returns the value of attribute start.
7 8 9 |
# File 'lib/smartystreets_ruby_sdk/us_extract/address.rb', line 7 def start @start end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
7 8 9 |
# File 'lib/smartystreets_ruby_sdk/us_extract/address.rb', line 7 def text @text end |
#verified ⇒ Object (readonly)
Returns the value of attribute verified.
7 8 9 |
# File 'lib/smartystreets_ruby_sdk/us_extract/address.rb', line 7 def verified @verified end |