Class: Casper::Entity::Transfer

Inherits:
Object
  • Object
show all
Defined in:
lib/entity/transfer.rb

Instance Method Summary collapse

Constructor Details

#initialize(transfer = {}) ⇒ Transfer

Returns a new instance of Transfer.

Parameters:

  • transfer (Hash) (defaults to: {})

Options Hash (transfer):

  • :deploy_hash (String)
  • :from (String)
  • :to (String)
  • :source (String)
  • :target (String)
  • :amount (String)
  • :gas (String)
  • :id (Integer)


14
15
16
17
18
19
20
21
22
23
# File 'lib/entity/transfer.rb', line 14

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_amountString

Returns amount.

Returns:

  • (String)

    amount



51
52
53
# File 'lib/entity/transfer.rb', line 51

def get_amount
  @amount
end

#get_deploy_hashString

Returns deploy_hash.

Returns:

  • (String)

    deploy_hash



26
27
28
# File 'lib/entity/transfer.rb', line 26

def get_deploy_hash
  @deploy_hash
end

#get_fromString

Returns from.

Returns:

  • (String)

    from



31
32
33
# File 'lib/entity/transfer.rb', line 31

def get_from
  @from
end

#get_gasString

Returns gas.

Returns:

  • (String)

    gas



56
57
58
# File 'lib/entity/transfer.rb', line 56

def get_gas
  @gas
end

#get_idInteger

Returns id.

Returns:

  • (Integer)

    id



60
61
62
# File 'lib/entity/transfer.rb', line 60

def get_id
  @id
end

#get_sourceString

Returns source.

Returns:

  • (String)

    source



41
42
43
# File 'lib/entity/transfer.rb', line 41

def get_source
  @source
end

#get_targetString

Returns target.

Returns:

  • (String)

    target



46
47
48
# File 'lib/entity/transfer.rb', line 46

def get_target
  @target
end

#get_toString

Returns to.

Returns:

  • (String)

    to



36
37
38
# File 'lib/entity/transfer.rb', line 36

def get_to
  @to
end