Class: Coinbase::FaucetTransaction
- Inherits:
-
Object
- Object
- Coinbase::FaucetTransaction
- Defined in:
- lib/coinbase/faucet_transaction.rb
Overview
A representation of a transaction from a faucet. a user-controlled Wallet to another address. The fee is assumed to be paid in the native Asset of the Network. Transfers should be created through Wallet#transfer or Address#transfer.
Instance Method Summary collapse
-
#initialize(model) ⇒ FaucetTransaction
constructor
Returns a new FaucetTransaction object.
-
#inspect ⇒ String
Same as to_s.
-
#to_s ⇒ String
Returns a String representation of the FaucetTransaction.
-
#transaction_hash ⇒ String
Returns the transaction hash.
-
#transaction_link ⇒ String
Returns the link to the transaction on the blockchain explorer.
Constructor Details
#initialize(model) ⇒ FaucetTransaction
Returns a new FaucetTransaction object. Do not use this method directly - instead, use Address#faucet.
11 12 13 |
# File 'lib/coinbase/faucet_transaction.rb', line 11 def initialize(model) @model = model end |
Instance Method Details
#inspect ⇒ String
Same as to_s.
35 36 37 |
# File 'lib/coinbase/faucet_transaction.rb', line 35 def inspect to_s end |
#to_s ⇒ String
Returns a String representation of the FaucetTransaction.
29 30 31 |
# File 'lib/coinbase/faucet_transaction.rb', line 29 def to_s "Coinbase::FaucetTransaction{transaction_hash: '#{transaction_hash}', transaction_link: '#{transaction_link}'}" end |
#transaction_hash ⇒ String
Returns the transaction hash.
17 18 19 |
# File 'lib/coinbase/faucet_transaction.rb', line 17 def transaction_hash model.transaction_hash end |
#transaction_link ⇒ String
Returns the link to the transaction on the blockchain explorer.
23 24 25 |
# File 'lib/coinbase/faucet_transaction.rb', line 23 def transaction_link model.transaction_link end |