Class: NanoConfiguration

Inherits:
Object
  • Object
show all
Defined in:
lib/configuration.rb

Overview

Configure the NanoRpc library.

Constant Summary collapse

@@client =
nil

Class Method Summary collapse

Class Method Details

.clientObject

Get the client used to make requests.



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

def self.client
    throw "Set NanoConfiguration.client before making RPC calls" if @@client == nil
    @@client
end

.client=(new_client) ⇒ Object

Set the client used to make requests.

new_client

The new client, which should be an instance of NanoRpcClient.



7
8
9
# File 'lib/configuration.rb', line 7

def self.client=(new_client)
    @@client = new_client
end