Class: Nis::Fee::ProvisionNamespace

Inherits:
Object
  • Object
show all
Defined in:
lib/nis/fee/provision_namespace.rb

Instance Method Summary collapse

Constructor Details

#initialize(transaction) ⇒ ProvisionNamespace

Returns a new instance of ProvisionNamespace.



3
4
5
# File 'lib/nis/fee/provision_namespace.rb', line 3

def initialize(transaction)
  @transaction = transaction
end

Instance Method Details

#testnet?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/nis/fee/provision_namespace.rb', line 18

def testnet?
  @transaction.network == :testnet
end

#to_iInteger

Returns fee in micro XEM.

Returns:

  • (Integer)

    fee in micro XEM



13
14
15
# File 'lib/nis/fee/provision_namespace.rb', line 13

def to_i
  value.to_i
end

#valueInteger

Returns fee in micro XEM.

Returns:

  • (Integer)

    fee in micro XEM



8
9
10
# File 'lib/nis/fee/provision_namespace.rb', line 8

def value
  @transaction.root? ? root_fee : sub_fee
end