Class: TreeHaver::BinaryRawPayload

Inherits:
Struct
  • Object
show all
Defined in:
lib/tree_haver/contracts.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#byte_lengthObject

Returns the value of attribute byte_length

Returns:

  • (Object)

    the current value of byte_length



224
225
226
# File 'lib/tree_haver/contracts.rb', line 224

def byte_length
  @byte_length
end

#encodingObject

Returns the value of attribute encoding

Returns:

  • (Object)

    the current value of encoding



224
225
226
# File 'lib/tree_haver/contracts.rb', line 224

def encoding
  @encoding
end

#regionsObject

Returns the value of attribute regions

Returns:

  • (Object)

    the current value of regions



224
225
226
# File 'lib/tree_haver/contracts.rb', line 224

def regions
  @regions
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



224
225
226
# File 'lib/tree_haver/contracts.rb', line 224

def value
  @value
end

Instance Method Details

#to_hObject



225
226
227
228
229
230
231
232
# File 'lib/tree_haver/contracts.rb', line 225

def to_h
  {
    encoding: encoding,
    value: value,
    byte_length: byte_length,
    regions: (regions || []).map(&:to_h)
  }
end