Class: BitWallet::Address
- Inherits:
-
Object
- Object
- BitWallet::Address
- Defined in:
- lib/bit_wallet/address.rb
Instance Attribute Summary collapse
-
#account ⇒ Object
readonly
Returns the value of attribute account.
-
#address ⇒ Object
readonly
Returns the value of attribute address.
Instance Method Summary collapse
- #==(other_address) ⇒ Object
-
#initialize(account, address = nil) ⇒ Address
constructor
A new instance of Address.
- #total_received ⇒ Object
Constructor Details
#initialize(account, address = nil) ⇒ Address
Returns a new instance of Address.
8 9 10 11 12 13 14 15 |
# File 'lib/bit_wallet/address.rb', line 8 def initialize(account, address=nil) @account = account @address = if address address else client.getnewaddress(@account.name) end end |
Instance Attribute Details
#account ⇒ Object (readonly)
Returns the value of attribute account.
4 5 6 |
# File 'lib/bit_wallet/address.rb', line 4 def account @account end |
#address ⇒ Object (readonly)
Returns the value of attribute address.
4 5 6 |
# File 'lib/bit_wallet/address.rb', line 4 def address @address end |
Instance Method Details
#==(other_address) ⇒ Object
21 22 23 |
# File 'lib/bit_wallet/address.rb', line 21 def ==(other_address) self.address == other_address.address end |