Class: Aria2Driver::JsonRpc::Connection
- Inherits:
-
Object
- Object
- Aria2Driver::JsonRpc::Connection
- Defined in:
- lib/aria2_driver/json_rpc/connection.rb
Constant Summary collapse
- DEFAULTS =
{ scheme: 'http', port: 80 }
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
-
#scheme ⇒ Object
readonly
Returns the value of attribute scheme.
Instance Method Summary collapse
-
#initialize(host, options = {}) ⇒ Connection
constructor
A new instance of Connection.
Constructor Details
#initialize(host, options = {}) ⇒ Connection
Returns a new instance of Connection.
13 14 15 16 |
# File 'lib/aria2_driver/json_rpc/connection.rb', line 13 def initialize(host, ={}) @host = host check_defaults() end |
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
11 12 13 |
# File 'lib/aria2_driver/json_rpc/connection.rb', line 11 def host @host end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
11 12 13 |
# File 'lib/aria2_driver/json_rpc/connection.rb', line 11 def port @port end |
#scheme ⇒ Object (readonly)
Returns the value of attribute scheme.
11 12 13 |
# File 'lib/aria2_driver/json_rpc/connection.rb', line 11 def scheme @scheme end |