Class: TRMNLP::Lint::Check
- Inherits:
-
Object
- Object
- TRMNLP::Lint::Check
- Defined in:
- lib/trmnlp/lint/check.rb
Overview
Base class for a single best-practice check. A subclass declares a MESSAGE constant (and optionally LEARN_MORE) and implements #pass?. Checks that surface a variable number of findings override #issues.
Direct Known Subclasses
TRMNLP::Lint::Checks::CustomFieldsUsed, TRMNLP::Lint::Checks::FormFieldsValid, TRMNLP::Lint::Checks::HighchartsAnimationsDisabled, TRMNLP::Lint::Checks::HighchartsElementsUnique, TRMNLP::Lint::Checks::ImageLinksReachable, TRMNLP::Lint::Checks::LayoutsHaveContent, TRMNLP::Lint::Checks::LimitedInlineStyles, TRMNLP::Lint::Checks::NoAsyncFunctions, TRMNLP::Lint::Checks::NoOpacity, TRMNLP::Lint::Checks::NoSizeClasses, TRMNLP::Lint::Checks::TitleCasing, TRMNLP::Lint::Checks::TitleLength, TRMNLP::Lint::Checks::WaitsForDomLoad
Instance Method Summary collapse
-
#initialize(source) ⇒ Check
constructor
A new instance of Check.
- #issues ⇒ Object
Constructor Details
#initialize(source) ⇒ Check
Returns a new instance of Check.
9 10 11 |
# File 'lib/trmnlp/lint/check.rb', line 9 def initialize(source) @source = source end |
Instance Method Details
#issues ⇒ Object
13 14 15 |
# File 'lib/trmnlp/lint/check.rb', line 13 def issues pass? ? [] : [issue] end |