Class: Markdown::Merge::DocumentProblems::Problem
- Inherits:
-
Struct
- Object
- Struct
- Markdown::Merge::DocumentProblems::Problem
- Defined in:
- lib/markdown/merge/document_problems.rb
Overview
Problem entry struct
Instance Attribute Summary collapse
-
#category ⇒ Object
Returns the value of attribute category.
-
#details ⇒ Object
Returns the value of attribute details.
-
#severity ⇒ Object
Returns the value of attribute severity.
Instance Method Summary collapse
Instance Attribute Details
#category ⇒ Object
Returns the value of attribute category
29 30 31 |
# File 'lib/markdown/merge/document_problems.rb', line 29 def category @category end |
#details ⇒ Object
Returns the value of attribute details
29 30 31 |
# File 'lib/markdown/merge/document_problems.rb', line 29 def details @details end |
#severity ⇒ Object
Returns the value of attribute severity
29 30 31 |
# File 'lib/markdown/merge/document_problems.rb', line 29 def severity @severity end |
Instance Method Details
#error? ⇒ Boolean
38 39 40 |
# File 'lib/markdown/merge/document_problems.rb', line 38 def error? severity == :error end |
#info? ⇒ Boolean
42 43 44 |
# File 'lib/markdown/merge/document_problems.rb', line 42 def info? severity == :info end |
#to_h ⇒ Object
30 31 32 |
# File 'lib/markdown/merge/document_problems.rb', line 30 def to_h {category: category, severity: severity, **details} end |
#warning? ⇒ Boolean
34 35 36 |
# File 'lib/markdown/merge/document_problems.rb', line 34 def warning? severity == :warning end |