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



191
192
193
# File 'lib/tree_haver/contracts.rb', line 191

def byte_range
  @byte_range
end

#categoryObject

Returns the value of attribute category

Returns:

  • (Object)

    the current value of category



191
192
193
# File 'lib/tree_haver/contracts.rb', line 191

def category
  @category
end

#messageObject

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



191
192
193
# File 'lib/tree_haver/contracts.rb', line 191

def message
  @message
end

#schema_pathObject

Returns the value of attribute schema_path

Returns:

  • (Object)

    the current value of schema_path



191
192
193
# File 'lib/tree_haver/contracts.rb', line 191

def schema_path
  @schema_path
end

#severityObject

Returns the value of attribute severity

Returns:

  • (Object)

    the current value of severity



191
192
193
# File 'lib/tree_haver/contracts.rb', line 191

def severity
  @severity
end

Instance Method Details

#to_hObject



192
193
194
195
196
197
198
199
200
# File 'lib/tree_haver/contracts.rb', line 192

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