Class: Guard::RailsBestPractices
- Defined in:
- lib/guard/rails_best_practices.rb,
lib/guard/rails_best_practices/notifier.rb
Defined Under Namespace
Classes: Notifier
Instance Method Summary collapse
-
#initialize(watchers = [], options = {}) ⇒ RailsBestPractices
constructor
A new instance of RailsBestPractices.
- #notify? ⇒ Boolean
- #reload ⇒ Object
- #run_all ⇒ Object
- #run_on_change(paths) ⇒ Object
- #run_on_deletion(paths) ⇒ Object
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(watchers = [], options = {}) ⇒ RailsBestPractices
Returns a new instance of RailsBestPractices.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/guard/rails_best_practices.rb', line 11 def initialize(watchers = [], = {}) super [:vendor] = true if [:vendor].nil? [:spec] = true if [:spec].nil? [:test] = true if [:test].nil? [:features] = true if [:features].nil? [:exclude] = '' if [:exclude].nil? [:run_at_start] = true if [:run_at_start].nil? end |
Instance Method Details
#notify? ⇒ Boolean
45 46 47 |
# File 'lib/guard/rails_best_practices.rb', line 45 def notify? !![:notify] end |
#reload ⇒ Object
30 31 32 |
# File 'lib/guard/rails_best_practices.rb', line 30 def reload run_bestpractices end |
#run_all ⇒ Object
34 35 36 |
# File 'lib/guard/rails_best_practices.rb', line 34 def run_all run_bestpractices end |
#run_on_change(paths) ⇒ Object
38 39 40 |
# File 'lib/guard/rails_best_practices.rb', line 38 def run_on_change(paths) run_bestpractices end |
#run_on_deletion(paths) ⇒ Object
42 43 |
# File 'lib/guard/rails_best_practices.rb', line 42 def run_on_deletion(paths) end |
#start ⇒ Object
22 23 24 |
# File 'lib/guard/rails_best_practices.rb', line 22 def start run_bestpractices if [:run_at_start] end |
#stop ⇒ Object
26 27 28 |
# File 'lib/guard/rails_best_practices.rb', line 26 def stop true end |