Class: Markdown::Merge::DocumentProblems::Problem

Inherits:
Struct
  • Object
show all
Defined in:
lib/markdown/merge/document_problems.rb

Overview

Problem entry struct

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#categoryObject

Returns the value of attribute category

Returns:

  • (Object)

    the current value of category



29
30
31
# File 'lib/markdown/merge/document_problems.rb', line 29

def category
  @category
end

#detailsObject

Returns the value of attribute details

Returns:

  • (Object)

    the current value of details



29
30
31
# File 'lib/markdown/merge/document_problems.rb', line 29

def details
  @details
end

#severityObject

Returns the value of attribute severity

Returns:

  • (Object)

    the current value of severity



29
30
31
# File 'lib/markdown/merge/document_problems.rb', line 29

def severity
  @severity
end

Instance Method Details

#error?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/markdown/merge/document_problems.rb', line 38

def error?
  severity == :error
end

#info?Boolean

Returns:

  • (Boolean)


42
43
44
# File 'lib/markdown/merge/document_problems.rb', line 42

def info?
  severity == :info
end

#to_hObject



30
31
32
# File 'lib/markdown/merge/document_problems.rb', line 30

def to_h
  {category: category, severity: severity, **details}
end

#warning?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/markdown/merge/document_problems.rb', line 34

def warning?
  severity == :warning
end