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