Class: SmartyStreets::USExtract::Result
- Inherits:
-
Object
- Object
- SmartyStreets::USExtract::Result
- Defined in:
- lib/smartystreets_ruby_sdk/us_extract/result.rb
Overview
Instance Attribute Summary collapse
-
#addresses ⇒ Object
readonly
Returns the value of attribute addresses.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
Instance Method Summary collapse
-
#initialize(obj) ⇒ Result
constructor
A new instance of Result.
Constructor Details
#initialize(obj) ⇒ Result
Returns a new instance of Result.
10 11 12 13 14 15 16 17 18 |
# File 'lib/smartystreets_ruby_sdk/us_extract/result.rb', line 10 def initialize(obj) @metadata = USExtract::Metadata.new(obj.fetch('meta', {})) addresses = obj.fetch('addresses', []) @addresses = [] addresses.each {|address| @addresses.push(SmartyStreets::USExtract::Address.new(address)) } end |
Instance Attribute Details
#addresses ⇒ Object (readonly)
Returns the value of attribute addresses.
8 9 10 |
# File 'lib/smartystreets_ruby_sdk/us_extract/result.rb', line 8 def addresses @addresses end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
8 9 10 |
# File 'lib/smartystreets_ruby_sdk/us_extract/result.rb', line 8 def @metadata end |