Class: Bearychat::Notifier::HttpClient
- Inherits:
-
Object
- Object
- Bearychat::Notifier::HttpClient
- Defined in:
- lib/bearychat-notifier/http_client.rb
Instance Attribute Summary collapse
-
#http_options ⇒ Object
readonly
Returns the value of attribute http_options.
-
#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(url, params) ⇒ HttpClient
constructor
A new instance of HttpClient.
Constructor Details
#initialize(url, params) ⇒ HttpClient
Returns a new instance of HttpClient.
13 14 15 16 17 |
# File 'lib/bearychat-notifier/http_client.rb', line 13 def initialize(url, params) @uri = url = params.delete(:http_options) || {} @params = params end |
Instance Attribute Details
#http_options ⇒ Object (readonly)
Returns the value of attribute http_options.
11 12 13 |
# File 'lib/bearychat-notifier/http_client.rb', line 11 def end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
11 12 13 |
# File 'lib/bearychat-notifier/http_client.rb', line 11 def params @params end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
11 12 13 |
# File 'lib/bearychat-notifier/http_client.rb', line 11 def uri @uri end |
Class Method Details
.post(uri, params) ⇒ Object
6 7 8 |
# File 'lib/bearychat-notifier/http_client.rb', line 6 def post(uri, params) HttpClient.new(uri, params).call end |
Instance Method Details
#call ⇒ Object
19 20 21 |
# File 'lib/bearychat-notifier/http_client.rb', line 19 def call http_post end |