Module: Expedition

Defined in:
lib/expedition.rb,
lib/expedition/client.rb,
lib/expedition/status.rb,
lib/expedition/version.rb,
lib/expedition/response.rb

Defined Under Namespace

Classes: Client, Response, Status

Constant Summary collapse

VERSION =
'0.4.0'.freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.clientClient

Returns the default client for connection to localhost on port 4028. Used for simple scripts that access the Expedition constant directly.

Returns:

  • (Client)

    The default client.



12
13
14
# File 'lib/expedition.rb', line 12

def client
  @client
end

Class Method Details

.new(host = 'localhost', port = 4028) ⇒ Client

Initializes a new Client.

Parameters:

  • host (String) (defaults to: 'localhost')

    The host to connect to.

  • port (Integer) (defaults to: 4028)

    The port to connect to.

Returns:

  • (Client)

    A client for accessing the API of a cgminer-compatible service.



28
29
30
# File 'lib/expedition.rb', line 28

def self.new(host = 'localhost', port = 4028)
  Client.new(host, port)
end