Module: Oxc::Diagnosed
- Included in:
- ParseResult, Result
- Defined in:
- lib/oxc/diagnosed.rb,
sig/oxc/diagnosed.rbs
Instance Method Summary collapse
-
#errors ⇒ Array[Oxc::Diagnostic]
: () -> Array.
-
#errors? ⇒ Boolean
: () -> bool.
-
#panicked? ⇒ Boolean
: () -> bool.
-
#warnings ⇒ Array[Oxc::Diagnostic]
: () -> Array.
-
#warnings? ⇒ Boolean
: () -> bool.
Instance Method Details
#errors ⇒ Array[Oxc::Diagnostic]
: () -> Array
9 10 11 |
# File 'lib/oxc/diagnosed.rb', line 9 def errors diagnostics.select(&:error?) end |
#errors? ⇒ Boolean
: () -> bool
19 20 21 |
# File 'lib/oxc/diagnosed.rb', line 19 def errors? !errors.empty? end |
#panicked? ⇒ Boolean
: () -> bool
29 30 31 |
# File 'lib/oxc/diagnosed.rb', line 29 def panicked? @panicked end |
#warnings ⇒ Array[Oxc::Diagnostic]
: () -> Array
14 15 16 |
# File 'lib/oxc/diagnosed.rb', line 14 def warnings diagnostics.select(&:warning?) end |
#warnings? ⇒ Boolean
: () -> bool
24 25 26 |
# File 'lib/oxc/diagnosed.rb', line 24 def warnings? !warnings.empty? end |