Sha256: 588da56b87d4b951648f7ae350f1c6df14b99d4790d55c330498d664ff2108e0

Contents?: true

Size: 353 Bytes

Versions: 2

Compression:

Stored size: 353 Bytes

Contents

module Bitcoiner
  class AccountHash < Hash
    def initialize(client, balance_hash)
      @client = client
      balance_hash.each_key do |name|
        self[name] = Account.new client, name
      end
    end

    def new(name)
      @client.request 'getnewaddress', name
      self[name] = Account.new @client, name
      self[name]
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bitcoiner-0.1.1 lib/bitcoiner/account_hash.rb
bitcoiner-0.1.0 lib/bitcoiner/account_hash.rb