Class: AusPostAPI::UriHandler
- Inherits:
-
Object
- Object
- AusPostAPI::UriHandler
- Defined in:
- lib/aus_post_api/uri_handler.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(uri, headers) ⇒ UriHandler
constructor
A new instance of UriHandler.
Constructor Details
#initialize(uri, headers) ⇒ UriHandler
Returns a new instance of UriHandler.
11 12 13 14 |
# File 'lib/aus_post_api/uri_handler.rb', line 11 def initialize(uri, headers) @headers = headers @uri = URI.parse(uri) end |
Class Method Details
.call(uri, headers = {}) ⇒ Object
7 8 9 |
# File 'lib/aus_post_api/uri_handler.rb', line 7 def self.call(uri, headers={}) self.new(uri, headers).call end |
Instance Method Details
#call ⇒ Object
16 17 18 |
# File 'lib/aus_post_api/uri_handler.rb', line 16 def call http.request(request) end |