Class: Wallet

Inherits:
Object
  • Object
show all
Defined in:
lib/centralbank/wallet.rb

Overview

Single Address Wallet

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(address) ⇒ Wallet

Returns a new instance of Wallet.



7
8
9
# File 'lib/centralbank/wallet.rb', line 7

def initialize( address )
  @address = address
end

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.



5
6
7
# File 'lib/centralbank/wallet.rb', line 5

def address
  @address
end

Instance Method Details

#generate_transaction(to, amount) ⇒ Object



11
12
13
# File 'lib/centralbank/wallet.rb', line 11

def generate_transaction( to, amount )
  Tx.new( address, to, amount )
end