Class: Aria2Driver::JsonRpc::Connection

Inherits:
Object
  • Object
show all
Defined in:
lib/aria2_driver/json_rpc/connection.rb

Constant Summary collapse

DEFAULTS =
{
    scheme: 'http',
    port: 80
}

Instance Attribute Summary collapse

Instance Method Summary collapse

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, options={})
  @host = host
  check_defaults(options)
end

Instance Attribute Details

#hostObject (readonly)

Returns the value of attribute host.



11
12
13
# File 'lib/aria2_driver/json_rpc/connection.rb', line 11

def host
  @host
end

#portObject (readonly)

Returns the value of attribute port.



11
12
13
# File 'lib/aria2_driver/json_rpc/connection.rb', line 11

def port
  @port
end

#schemeObject (readonly)

Returns the value of attribute scheme.



11
12
13
# File 'lib/aria2_driver/json_rpc/connection.rb', line 11

def scheme
  @scheme
end