Class: Guard::Rails_best_practices
- Defined in:
- lib/guard/rails_best_practices.rb,
lib/guard/guard-rails_best_practices/version.rb
Constant Summary collapse
- VERSION =
"0.1.0"
Instance Method Summary collapse
-
#initialize(watchers = [], options = {}) ⇒ Rails_best_practices
constructor
A new instance of Rails_best_practices.
- #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 = {}) ⇒ Rails_best_practices
Returns a new instance of Rails_best_practices.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/guard/rails_best_practices.rb', line 9 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
43 44 45 |
# File 'lib/guard/rails_best_practices.rb', line 43 def notify? !![:notify] end |
#reload ⇒ Object
28 29 30 |
# File 'lib/guard/rails_best_practices.rb', line 28 def reload run_bestpractices end |
#run_all ⇒ Object
32 33 34 |
# File 'lib/guard/rails_best_practices.rb', line 32 def run_all run_bestpractices end |
#run_on_change(paths) ⇒ Object
36 37 38 |
# File 'lib/guard/rails_best_practices.rb', line 36 def run_on_change(paths) run_bestpractices end |
#run_on_deletion(paths) ⇒ Object
40 41 |
# File 'lib/guard/rails_best_practices.rb', line 40 def run_on_deletion(paths) end |
#start ⇒ Object
20 21 22 |
# File 'lib/guard/rails_best_practices.rb', line 20 def start run_bestpractices if [:run_at_start] end |
#stop ⇒ Object
24 25 26 |
# File 'lib/guard/rails_best_practices.rb', line 24 def stop true end |