Method: Bitcoin::Account#initialize

Defined in:
lib/bc.rb

#initialize(bc, account_name) ⇒ Account

bc is a Bitcoin::Client instance. account_name is the (String) name of the account we’re associated with. account_name may be “”, in which case we represent the default account.



305
306
307
308
309
310
311
312
313
314
315
316
# File 'lib/bc.rb', line 305

def initialize(bc, )
  @bc = bc
  @name = .freeze

  unless @name.is_a?(String)
    raise TypeError, "account_name must be a String (#{@name.class} given)"
  end

  unless @bc.is_a?(Bitcoin::Client)
    raise TypeError, "bc must be a Bitcoin::Client (#{@bc.class} given)"
  end
end