Class: IdealPostcodes::Address::SearchResult

Inherits:
Object
  • Object
show all
Defined in:
lib/idealpostcodes/address.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#addressesObject (readonly)

Returns the value of attribute addresses.



4
5
6
# File 'lib/idealpostcodes/address.rb', line 4

def addresses
  @addresses
end

#limitObject (readonly)

Returns the value of attribute limit.



4
5
6
# File 'lib/idealpostcodes/address.rb', line 4

def limit
  @limit
end

#pageObject (readonly)

Returns the value of attribute page.



4
5
6
# File 'lib/idealpostcodes/address.rb', line 4

def page
  @page
end