Class: SmartyStreets::USExtract::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/smartystreets_ruby_sdk/us_extract/result.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#addressesObject (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

#metadataObject (readonly)

Returns the value of attribute metadata.



8
9
10
# File 'lib/smartystreets_ruby_sdk/us_extract/result.rb', line 8

def 
  @metadata
end