Class: Runar::SDK::StateField

Inherits:
Struct
  • Object
show all
Defined in:
lib/runar/sdk/types.rb

Overview

A state field in a stateful contract.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, type:, index:, initial_value: nil) ⇒ StateField

Returns a new instance of StateField.



56
57
58
# File 'lib/runar/sdk/types.rb', line 56

def initialize(name:, type:, index:, initial_value: nil)
  super
end

Instance Attribute Details

#indexObject

Returns the value of attribute index

Returns:

  • (Object)

    the current value of index



55
56
57
# File 'lib/runar/sdk/types.rb', line 55

def index
  @index
end

#initial_valueObject

Returns the value of attribute initial_value

Returns:

  • (Object)

    the current value of initial_value



55
56
57
# File 'lib/runar/sdk/types.rb', line 55

def initial_value
  @initial_value
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



55
56
57
# File 'lib/runar/sdk/types.rb', line 55

def name
  @name
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



55
56
57
# File 'lib/runar/sdk/types.rb', line 55

def type
  @type
end