Class: Correios::AddressSearchResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/correios/address_search_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(html_body) ⇒ AddressSearchResponse

Returns a new instance of AddressSearchResponse.



9
10
11
# File 'lib/correios/address_search_response.rb', line 9

def initialize(html_body)
  @body = html_body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



7
8
9
# File 'lib/correios/address_search_response.rb', line 7

def body
  @body
end

Instance Method Details

#addressesObject



13
14
15
# File 'lib/correios/address_search_response.rb', line 13

def addresses
  @addresses ||= items.map{|item| address(item)}
end