Class: NanoRpc::Account
- Inherits:
-
Object
- Object
- NanoRpc::Account
- Includes:
- AccountHelper, AccountMethods, Proxy
- Defined in:
- lib/nano_rpc/account.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
Attributes included from Proxy
Instance Method Summary collapse
-
#initialize(address = nil, opts = {}) ⇒ Account
constructor
A new instance of Account.
- #inspect ⇒ Object
Methods included from AccountMethods
Methods included from AccountHelper
#balance, #block_count, #history, #info, #key, #move, #pending_balance, #pending_blocks, #remove, #representative, #representative_set, #valid?, #wallet_work_set, #weight
Constructor Details
#initialize(address = nil, opts = {}) ⇒ Account
Returns a new instance of Account.
9 10 11 12 13 14 15 16 17 |
# File 'lib/nano_rpc/account.rb', line 9 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
#address ⇒ Object (readonly)
Returns the value of attribute address.
7 8 9 |
# File 'lib/nano_rpc/account.rb', line 7 def address @address end |
Instance Method Details
#inspect ⇒ Object
19 20 21 |
# File 'lib/nano_rpc/account.rb', line 19 def inspect "#{inspect_prefix}, @address=\"#{@address}\">" end |