Class: Correios::AddressSearchResponse
- Inherits:
-
Object
- Object
- Correios::AddressSearchResponse
- Defined in:
- lib/correios/address_search_response.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
Instance Method Summary collapse
- #addresses ⇒ Object
-
#initialize(html_body) ⇒ AddressSearchResponse
constructor
A new instance of AddressSearchResponse.
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
#body ⇒ Object (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
#addresses ⇒ Object
13 14 15 |
# File 'lib/correios/address_search_response.rb', line 13 def addresses @addresses ||= items.map{|item| address(item)} end |