Class: AddressFinder::AddressAutocomplete
- Inherits:
-
Object
- Object
- AddressFinder::AddressAutocomplete
- Defined in:
- lib/addressfinder/address_autocomplete.rb
Defined Under Namespace
Classes: Result
Instance Attribute Summary collapse
-
#results ⇒ Object
readonly
Returns the value of attribute results.
Instance Method Summary collapse
-
#initialize(params:, http:) ⇒ AddressAutocomplete
constructor
A new instance of AddressAutocomplete.
- #perform ⇒ Object
Constructor Details
#initialize(params:, http:) ⇒ AddressAutocomplete
Returns a new instance of AddressAutocomplete.
8 9 10 11 12 13 14 15 |
# File 'lib/addressfinder/address_autocomplete.rb', line 8 def initialize(params:, http:) @http = http @country = params.delete(:country) || 'au' @params = params @params[:key] ||= config.api_key @params[:secret] ||= config.api_secret end |
Instance Attribute Details
#results ⇒ Object
Returns the value of attribute results.
6 7 8 |
# File 'lib/addressfinder/address_autocomplete.rb', line 6 def results @results end |
Instance Method Details
#perform ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/addressfinder/address_autocomplete.rb', line 17 def perform validate_params build_request execute_request build_result self end |