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