Class: Nem::Fee::ProvisionNamespace

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

Instance Method Summary collapse

Constructor Details

#initialize(transaction) ⇒ ProvisionNamespace

Returns a new instance of ProvisionNamespace.



4
5
6
# File 'lib/nem/fee/provision_namespace.rb', line 4

def initialize(transaction)
  @transaction = transaction
end

Instance Method Details

#testnet?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/nem/fee/provision_namespace.rb', line 19

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

#to_iInteger

Returns fee in micro XEM.

Returns:

  • (Integer)

    fee in micro XEM



14
15
16
# File 'lib/nem/fee/provision_namespace.rb', line 14

def to_i
  value.to_i
end

#valueInteger

Returns fee in micro XEM.

Returns:

  • (Integer)

    fee in micro XEM



9
10
11
# File 'lib/nem/fee/provision_namespace.rb', line 9

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