Class: Tornados::HttpClient
- Inherits:
-
Object
- Object
- Tornados::HttpClient
- Defined in:
- lib/tornados/http_client.rb
Instance Attribute Summary collapse
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
-
#logger_status ⇒ Object
readonly
Returns the value of attribute logger_status.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(url, path, method, params, logger_status: false) ⇒ HttpClient
constructor
A new instance of HttpClient.
Constructor Details
#initialize(url, path, method, params, logger_status: false) ⇒ HttpClient
Returns a new instance of HttpClient.
10 11 12 13 14 15 16 17 |
# File 'lib/tornados/http_client.rb', line 10 def initialize(url, path, method, params, logger_status: false) @url = url @path = path @method = method @params = params @connection = prepare_connection @logger_status = logger_status end |
Instance Attribute Details
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
8 9 10 |
# File 'lib/tornados/http_client.rb', line 8 def connection @connection end |
#logger_status ⇒ Object (readonly)
Returns the value of attribute logger_status.
8 9 10 |
# File 'lib/tornados/http_client.rb', line 8 def logger_status @logger_status end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
8 9 10 |
# File 'lib/tornados/http_client.rb', line 8 def method @method end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
8 9 10 |
# File 'lib/tornados/http_client.rb', line 8 def params @params end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
8 9 10 |
# File 'lib/tornados/http_client.rb', line 8 def path @path end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
8 9 10 |
# File 'lib/tornados/http_client.rb', line 8 def url @url end |
Class Method Details
.call(*args) ⇒ Object
19 20 21 |
# File 'lib/tornados/http_client.rb', line 19 def self.call(*args) new(*args).send(:execute) end |