Class: Casper::Entity::Transfer
- Inherits:
-
Object
- Object
- Casper::Entity::Transfer
- Defined in:
- lib/entity/transfer.rb
Overview
Represents a transfer from one purse to another
Instance Method Summary collapse
-
#get_amount ⇒ String
Transfer amount.
-
#get_deploy_hash ⇒ String
Deploy that created the transfer.
-
#get_from ⇒ String
Account from which transfer was executed.
-
#get_gas ⇒ String
Gas.
-
#get_id ⇒ Integer
User-defined id.
-
#get_source ⇒ String
Tource purse.
-
#get_target ⇒ String
Target purse.
-
#get_to ⇒ String
Account to which funds are transferred.
-
#initialize(transfer = {}) ⇒ Transfer
constructor
A new instance of Transfer.
Constructor Details
#initialize(transfer = {}) ⇒ Transfer
Returns a new instance of Transfer.
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/entity/transfer.rb', line 15 def initialize(transfer = {}) @deploy_hash = transfer[:deploy_hash] @from = transfer[:from] @to = transfer[:to] @source = transfer[:source] @target = transfer[:target] @amount = transfer[:amount] @gas = transfer[:gas] @id = transfer[:id] end |
Instance Method Details
#get_amount ⇒ String
Returns transfer amount.
52 53 54 |
# File 'lib/entity/transfer.rb', line 52 def get_amount @amount end |
#get_deploy_hash ⇒ String
Returns deploy that created the transfer.
27 28 29 |
# File 'lib/entity/transfer.rb', line 27 def get_deploy_hash @deploy_hash end |
#get_from ⇒ String
Returns account from which transfer was executed.
32 33 34 |
# File 'lib/entity/transfer.rb', line 32 def get_from @from end |
#get_gas ⇒ String
Returns gas.
57 58 59 |
# File 'lib/entity/transfer.rb', line 57 def get_gas @gas end |
#get_id ⇒ Integer
Returns user-defined id.
61 62 63 |
# File 'lib/entity/transfer.rb', line 61 def get_id @id end |
#get_source ⇒ String
Returns tource purse.
42 43 44 |
# File 'lib/entity/transfer.rb', line 42 def get_source @source end |
#get_target ⇒ String
Returns target purse.
47 48 49 |
# File 'lib/entity/transfer.rb', line 47 def get_target @target end |
#get_to ⇒ String
Returns account to which funds are transferred.
37 38 39 |
# File 'lib/entity/transfer.rb', line 37 def get_to @to end |