Class: NanoRpc::Accounts

Inherits:
Object
  • Object
show all
Includes:
AccountsHelper, AccountsMethods, Proxy
Defined in:
lib/nano_rpc/accounts.rb

Instance Attribute Summary collapse

Attributes included from Proxy

#node

Instance Method Summary collapse

Methods included from AccountsMethods

#proxy_methods, #proxy_params

Methods included from AccountsHelper

#<<, #[], #balances, #each, #frontiers, #move, #pending, #pending_balances, #to_a

Constructor Details

#initialize(addresses = nil, opts = {}) ⇒ Accounts

Returns a new instance of Accounts.



9
10
11
12
13
14
15
16
17
# File 'lib/nano_rpc/accounts.rb', line 9

def initialize(addresses = nil, opts = {})
  unless addresses.is_a?(Array)
    raise NanoRpc::MissingParameters,
          'Missing argument: addresses (str[])'
  end

  @addresses = addresses
  super(opts)
end

Instance Attribute Details

#addressesObject (readonly)

Returns the value of attribute addresses.



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

def addresses
  @addresses
end

Instance Method Details

#inspectObject



19
20
21
# File 'lib/nano_rpc/accounts.rb', line 19

def inspect
  "#{inspect_prefix}, @addresses=\"#{@addresses}\">"
end