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



828
829
830
# File 'lib/tree_haver/contracts.rb', line 828

def byte_length
  @byte_length
end

#encodingObject

Returns the value of attribute encoding

Returns:

  • (Object)

    the current value of encoding



828
829
830
# File 'lib/tree_haver/contracts.rb', line 828

def encoding
  @encoding
end

#regionsObject

Returns the value of attribute regions

Returns:

  • (Object)

    the current value of regions



828
829
830
# File 'lib/tree_haver/contracts.rb', line 828

def regions
  @regions
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



828
829
830
# File 'lib/tree_haver/contracts.rb', line 828

def value
  @value
end

Instance Method Details

#to_hObject



829
830
831
832
833
834
835
836
# File 'lib/tree_haver/contracts.rb', line 829

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