Class: RaiblocksRpc::Account
- Defined in:
- lib/raiblocks_rpc/proxies/account.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
Attributes inherited from Proxy
Instance Method Summary collapse
-
#initialize(address) ⇒ Account
constructor
A new instance of Account.
- #proxy_methods ⇒ Object
- #proxy_params ⇒ Object
Constructor Details
#initialize(address) ⇒ Account
Returns a new instance of Account.
5 6 7 8 9 10 11 12 |
# File 'lib/raiblocks_rpc/proxies/account.rb', line 5 def initialize(address) unless address raise RaiblocksRpc::MissingArguments, 'Missing argument: address (str)' end self.address = address end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RaiblocksRpc::Proxy
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
3 4 5 |
# File 'lib/raiblocks_rpc/proxies/account.rb', line 3 def address @address end |
Instance Method Details
#proxy_methods ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/raiblocks_rpc/proxies/account.rb', line 18 def proxy_methods { account_balance: nil, account_block_count: nil, account_info: nil, account_create: { required: i[wallet] }, account_history: { required: i[count] }, account_list: nil, account_move: { required: i[wallet source accounts] }, account_key: nil, account_remove: { required: i[wallet] }, account_representative: nil, account_representative_set: { required: i[wallet representative] }, account_weight: nil, delegators: nil, delegators_count: nil, frontiers: { required: i[count] }, frontier_count: nil, ledger: { required: i[count] }, validate_account_number: nil, pending: { required: i[count], optional: i[threshold exists] }, payment_wait: { required: i[amount timeout] }, accounts_balances: { required: i[accounts] }, accounts_create: { required: i[accounts wallet count], optional: i[work] }, accounts_frontiers: { required: i[accounts] }, accounts_pending: { required: i[accounts count], optional: i[threshold source] } } end |
#proxy_params ⇒ Object
14 15 16 |
# File 'lib/raiblocks_rpc/proxies/account.rb', line 14 def proxy_params { account: :address } end |