Module: Packwerk::Checker Abstract
- Included in:
- ReferenceChecking::Checkers::DependencyChecker
- Defined in:
- lib/packwerk/checker.rb
Overview
This module is abstract.
Class Method Summary collapse
-
.all ⇒ Object
: -> Array.
-
.find(violation_type) ⇒ Object
: (String violation_type) -> Checker.
-
.included(base) ⇒ Object
: (Class base) -> void.
Instance Method Summary collapse
-
#invalid_reference?(reference) ⇒ Boolean
abstract
: (Reference reference) -> bool.
-
#message(reference) ⇒ Object
abstract
: (Reference reference) -> String.
-
#strict_mode_violation?(offense) ⇒ Boolean
abstract
: (ReferenceOffense offense) -> bool.
-
#violation_type ⇒ Object
abstract
: -> String.
Class Method Details
.all ⇒ Object
: -> Array
14 15 16 17 |
# File 'lib/packwerk/checker.rb', line 14 def all load_defaults checkers.map(&:new) #: as Array[Checker] end |
.find(violation_type) ⇒ Object
: (String violation_type) -> Checker
20 21 22 |
# File 'lib/packwerk/checker.rb', line 20 def find(violation_type) checker_by_violation_type(violation_type) end |
.included(base) ⇒ Object
: (Class base) -> void
9 10 11 |
# File 'lib/packwerk/checker.rb', line 9 def included(base) checkers << base end |
Instance Method Details
#invalid_reference?(reference) ⇒ Boolean
This method is abstract.
: (Reference reference) -> bool
55 |
# File 'lib/packwerk/checker.rb', line 55 def invalid_reference?(reference) = raise NotImplementedError, "Abstract method called" |
#message(reference) ⇒ Object
This method is abstract.
: (Reference reference) -> String
59 |
# File 'lib/packwerk/checker.rb', line 59 def (reference) = raise NotImplementedError, "Abstract method called" |
#strict_mode_violation?(offense) ⇒ Boolean
This method is abstract.
: (ReferenceOffense offense) -> bool
51 |
# File 'lib/packwerk/checker.rb', line 51 def strict_mode_violation?(offense) = raise NotImplementedError, "Abstract method called" |
#violation_type ⇒ Object
This method is abstract.
: -> String
47 |
# File 'lib/packwerk/checker.rb', line 47 def violation_type = raise NotImplementedError, "Abstract method called" |