Class: NanoRpc::Account

Inherits:
Object
  • Object
show all
Includes:
AccountHelper, Proxy
Defined in:
lib/nano_rpc/proxies/account.rb

Instance Attribute Summary collapse

Attributes included from Proxy

#node

Instance Method Summary collapse

Methods included from AccountHelper

#balance, #block_count, #history, #info, #key, #move, #pending_balance, #pending_blocks, #remove, #representative, #representative_set, #valid?, #wallet_work_set, #weight

Methods included from Proxy

included, #proxy_methods

Constructor Details

#initialize(address = nil, opts = {}) ⇒ Account

Returns a new instance of Account.



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

def initialize(address = nil, opts = {})
  unless address.is_a?(String)
    raise NanoRpc::MissingParameters,
          'Missing argument: address (str)'
  end

  @address = address
  super(opts)
end

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.



6
7
8
# File 'lib/nano_rpc/proxies/account.rb', line 6

def address
  @address
end