Class: TreeHaver::BinaryDiagnostic

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#byte_rangeObject

Returns the value of attribute byte_range

Returns:

  • (Object)

    the current value of byte_range



795
796
797
# File 'lib/tree_haver/contracts.rb', line 795

def byte_range
  @byte_range
end

#categoryObject

Returns the value of attribute category

Returns:

  • (Object)

    the current value of category



795
796
797
# File 'lib/tree_haver/contracts.rb', line 795

def category
  @category
end

#messageObject

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



795
796
797
# File 'lib/tree_haver/contracts.rb', line 795

def message
  @message
end

#schema_pathObject

Returns the value of attribute schema_path

Returns:

  • (Object)

    the current value of schema_path



795
796
797
# File 'lib/tree_haver/contracts.rb', line 795

def schema_path
  @schema_path
end

#severityObject

Returns the value of attribute severity

Returns:

  • (Object)

    the current value of severity



795
796
797
# File 'lib/tree_haver/contracts.rb', line 795

def severity
  @severity
end

Instance Method Details

#to_hObject



796
797
798
799
800
801
802
803
804
# File 'lib/tree_haver/contracts.rb', line 796

def to_h
  {
    severity: severity,
    category: category,
    message: message,
    schema_path: schema_path,
    **(byte_range ? { byte_range: byte_range.to_h } : {})
  }
end