Class: RaiblocksRpc::Accounts
- Defined in:
- lib/raiblocks_rpc/proxies/accounts.rb
Instance Attribute Summary collapse
-
#addresses ⇒ Object
Returns the value of attribute addresses.
Attributes inherited from Proxy
Instance Method Summary collapse
-
#initialize(addresses) ⇒ Accounts
constructor
A new instance of Accounts.
- #proxy_methods ⇒ Object
- #proxy_params ⇒ Object
Constructor Details
#initialize(addresses) ⇒ Accounts
Returns a new instance of Accounts.
5 6 7 8 9 10 11 12 |
# File 'lib/raiblocks_rpc/proxies/accounts.rb', line 5 def initialize(addresses) unless addresses.is_a?(Array) raise RaiblocksRpc::MissingArguments, 'Missing argument: addresses (str[])' end self.addresses = addresses end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RaiblocksRpc::Proxy
Instance Attribute Details
#addresses ⇒ Object
Returns the value of attribute addresses.
3 4 5 |
# File 'lib/raiblocks_rpc/proxies/accounts.rb', line 3 def addresses @addresses end |
Instance Method Details
#proxy_methods ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/raiblocks_rpc/proxies/accounts.rb', line 18 def proxy_methods { accounts_balances: nil, accounts_create: { required: i[wallet count], optional: i[work] }, accounts_frontiers: nil, accounts_pending: { required: i[count], optional: i[threshold source] } } end |
#proxy_params ⇒ Object
14 15 16 |
# File 'lib/raiblocks_rpc/proxies/accounts.rb', line 14 def proxy_params { accounts: :addresses } end |