Class: Bcoin::Client::Account

Inherits:
Base
  • Object
show all
Defined in:
lib/bcoin/client/account.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#attributes

Instance Method Summary collapse

Methods inherited from Base

#error=, #id, #initialize, #inspect, #refresh!, #token=, #wallet_token

Methods included from HttpMethods

#delete, #get, #post, #put, #wallet_token

Constructor Details

This class inherits a constructor from Bcoin::Client::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Bcoin::Client::Base

Instance Attribute Details

#clientObject (readonly)

Contains an instance of Bcoin::Client::Wallet which adheres to the HTTP client interface but builds the URL correctly for the specific wallet which this account belongs to.



9
10
11
# File 'lib/bcoin/client/account.rb', line 9

def client
  @client
end

Instance Method Details

#base_pathObject



15
16
17
# File 'lib/bcoin/client/account.rb', line 15

def base_path
  '/account/' + name.to_s
end

#nameObject



11
12
13
# File 'lib/bcoin/client/account.rb', line 11

def name
  @attributes[:name]
end