Class: Nis::Transaction::ProvisionNamespace

Inherits:
Object
  • Object
show all
Includes:
Mixin::Struct
Defined in:
lib/nis/transaction/provision_namespace.rb

Overview

Constant Summary collapse

TYPE =

8193 (provision namespace transaction)

0x2001

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Mixin::Struct

#[], #to_hash, #to_json

Constructor Details

#initialize(new_part, parent = nil, network: :testnet) ⇒ ProvisionNamespace

Returns a new instance of ProvisionNamespace.



33
34
35
36
37
38
39
40
41
42
43
# File 'lib/nis/transaction/provision_namespace.rb', line 33

def initialize(new_part, parent = nil, network: :testnet)
  @type = TYPE
  @network = network

  @newPart = new_part
  @parent = parent
  @rentalFee = rental[:fee]
  @rentalFeeSink = rental[:sink]

  @fee = Nis::Fee::ProvisionNamespace.new(self)
end

Instance Attribute Details

#deadlineInteger

Returns the current value of deadline.

Returns:

  • (Integer)

    the current value of deadline



15
16
17
# File 'lib/nis/transaction/provision_namespace.rb', line 15

def deadline
  @deadline
end

#feeInteger

Returns the current value of fee.

Returns:

  • (Integer)

    the current value of fee



15
16
17
# File 'lib/nis/transaction/provision_namespace.rb', line 15

def fee
  @fee
end

#networkSymbol

Returns the current value of network.

Returns:

  • (Symbol)

    the current value of network



15
16
17
# File 'lib/nis/transaction/provision_namespace.rb', line 15

def network
  @network
end

#newPartString Also known as: new_part

Returns the current value of newPart.

Returns:

  • (String)

    the current value of newPart



15
16
17
# File 'lib/nis/transaction/provision_namespace.rb', line 15

def newPart
  @newPart
end

#parentString

Returns the current value of parent.

Returns:

  • (String)

    the current value of parent



15
16
17
# File 'lib/nis/transaction/provision_namespace.rb', line 15

def parent
  @parent
end

#rentalFeeInteger Also known as: rental_fee

Returns the current value of rentalFee.

Returns:

  • (Integer)

    the current value of rentalFee



15
16
17
# File 'lib/nis/transaction/provision_namespace.rb', line 15

def rentalFee
  @rentalFee
end

#rentalFeeSinkString Also known as: rental_fee_sink

Returns the current value of rentalFeeSink.

Returns:

  • (String)

    the current value of rentalFeeSink



15
16
17
# File 'lib/nis/transaction/provision_namespace.rb', line 15

def rentalFeeSink
  @rentalFeeSink
end

#signatureString

Returns the current value of signature.

Returns:

  • (String)

    the current value of signature



15
16
17
# File 'lib/nis/transaction/provision_namespace.rb', line 15

def signature
  @signature
end

#signerString

Returns the current value of signer.

Returns:

  • (String)

    the current value of signer



15
16
17
# File 'lib/nis/transaction/provision_namespace.rb', line 15

def signer
  @signer
end

#timeStampInteger Also known as: timestamp

Returns the current value of timeStamp.

Returns:

  • (Integer)

    the current value of timeStamp



15
16
17
# File 'lib/nis/transaction/provision_namespace.rb', line 15

def timeStamp
  @timeStamp
end

#typeInteger

Returns the current value of type.

Returns:

  • (Integer)

    the current value of type



15
16
17
# File 'lib/nis/transaction/provision_namespace.rb', line 15

def type
  @type
end

#versionInteger

Returns the current value of version.

Returns:

  • (Integer)

    the current value of version



15
16
17
# File 'lib/nis/transaction/provision_namespace.rb', line 15

def version
  @version
end

Instance Method Details

#root?Boolean

Returns:

  • (Boolean)


45
46
47
# File 'lib/nis/transaction/provision_namespace.rb', line 45

def root?
  !!(@parent == nil)
end

#sub?Boolean

Returns:

  • (Boolean)


49
50
51
# File 'lib/nis/transaction/provision_namespace.rb', line 49

def sub?
  !!(@parent && @newPart)
end