Class: Slack::Notifier::DefaultHTTPClient
- Inherits:
-
Object
- Object
- Slack::Notifier::DefaultHTTPClient
- Defined in:
- lib/slack-notifier/default_http_client.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(uri, params) ⇒ DefaultHTTPClient
constructor
A new instance of DefaultHTTPClient.
Constructor Details
#initialize(uri, params) ⇒ DefaultHTTPClient
Returns a new instance of DefaultHTTPClient.
14 15 16 17 |
# File 'lib/slack-notifier/default_http_client.rb', line 14 def initialize uri, params @uri = uri @params = params end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
12 13 14 |
# File 'lib/slack-notifier/default_http_client.rb', line 12 def params @params end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
12 13 14 |
# File 'lib/slack-notifier/default_http_client.rb', line 12 def uri @uri end |
Class Method Details
.post(uri, params) ⇒ Object
7 8 9 |
# File 'lib/slack-notifier/default_http_client.rb', line 7 def post uri, params DefaultHTTPClient.new( uri, params ).call end |
Instance Method Details
#call ⇒ Object
19 20 21 |
# File 'lib/slack-notifier/default_http_client.rb', line 19 def call http_obj.request request_obj end |