Class: Raiblocks::Accounts

Inherits:
Object
  • Object
show all
Includes:
AccountsProxyHelper, Proxy
Defined in:
lib/raiblocks/proxies/accounts.rb

Instance Attribute Summary collapse

Attributes included from Proxy

#client

Instance Method Summary collapse

Methods included from AccountsProxyHelper

#<<, #[], #balances, #create, #each, #first, #frontiers, #pending, #second, #third

Methods included from Proxy

included, #methods, #proxy_methods

Constructor Details

#initialize(addresses = nil, client = nil) ⇒ Accounts

Returns a new instance of Accounts.



8
9
10
11
12
13
14
15
16
# File 'lib/raiblocks/proxies/accounts.rb', line 8

def initialize(addresses = nil, client = nil)
  unless addresses.is_a?(Array)
    raise Raiblocks::MissingParameters,
          'Missing argument: addresses (str[])'
  end

  @addresses = addresses
  @client = client || Raiblocks.client
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Raiblocks::Proxy

Instance Attribute Details

#addressesObject

Returns the value of attribute addresses.



6
7
8
# File 'lib/raiblocks/proxies/accounts.rb', line 6

def addresses
  @addresses
end