Class: IdealPostcodes::Address::SearchResult
- Inherits:
-
Object
- Object
- IdealPostcodes::Address::SearchResult
- Defined in:
- lib/idealpostcodes/address.rb
Instance Attribute Summary collapse
-
#addresses ⇒ Object
readonly
Returns the value of attribute addresses.
-
#limit ⇒ Object
readonly
Returns the value of attribute limit.
-
#page ⇒ Object
readonly
Returns the value of attribute page.
Instance Method Summary collapse
-
#initialize(response) ⇒ SearchResult
constructor
A new instance of SearchResult.
Constructor Details
#initialize(response) ⇒ SearchResult
Returns a new instance of SearchResult.
5 6 7 8 9 |
# File 'lib/idealpostcodes/address.rb', line 5 def initialize response @page = response[:result][:page] @limit = response[:result][:limit] @addresses = response[:result][:hits] end |
Instance Attribute Details
#addresses ⇒ Object (readonly)
Returns the value of attribute addresses.
4 5 6 |
# File 'lib/idealpostcodes/address.rb', line 4 def addresses @addresses end |
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
4 5 6 |
# File 'lib/idealpostcodes/address.rb', line 4 def limit @limit end |
#page ⇒ Object (readonly)
Returns the value of attribute page.
4 5 6 |
# File 'lib/idealpostcodes/address.rb', line 4 def page @page end |