Class: Rwm::ConventionChecker
- Inherits:
-
Object
- Object
- Rwm::ConventionChecker
- Defined in:
- lib/rwm/convention_checker.rb
Instance Method Summary collapse
- #check ⇒ Object
- #check! ⇒ Object
-
#initialize(graph) ⇒ ConventionChecker
constructor
A new instance of ConventionChecker.
Constructor Details
#initialize(graph) ⇒ ConventionChecker
Returns a new instance of ConventionChecker.
5 6 7 |
# File 'lib/rwm/convention_checker.rb', line 5 def initialize(graph) @graph = graph end |
Instance Method Details
#check ⇒ Object
20 21 22 23 24 25 |
# File 'lib/rwm/convention_checker.rb', line 20 def check check! [] rescue ConventionError => e e.violations end |
#check! ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/rwm/convention_checker.rb', line 9 def check! violations = [] violations.concat(check_no_lib_depends_on_app) violations.concat(check_no_app_depends_on_app) violations.concat(check_no_cycles) raise ConventionError, violations unless violations.empty? true end |