Module: Rbsx

Defined in:
lib/rbsx.rb,
lib/rbsx/client.rb,
lib/rbsx/version.rb,
lib/rbsx/exceptions.rb

Defined Under Namespace

Classes: Client, RbsxError, SxNotFound

Constant Summary collapse

CONFIG_ATTRS =
%i[sx_path master_public_key]
VERSION =
"0.1.0"

Class Method Summary collapse

Class Method Details

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (Rbsx)

    the object that the method was called on



18
19
20
# File 'lib/rbsx.rb', line 18

def self.configure(&block)
  yield self
end

.new(args = {}) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/rbsx.rb', line 10

def self.new(args={})
  config = CONFIG_ATTRS.inject({}) do |hash, config_attr|
    hash[config_attr] = args[config_attr] || Rbsx.send(config_attr)
    hash
  end
  Client.new(config)
end