Class: Guard::Rna
Constant Summary
Constants included from Guard
Instance Method Summary collapse
-
#initialize(watchers = [], options = {}) ⇒ Rna
constructor
Initialize a Guard.
-
#run_all ⇒ Object
Called when just ‘enter` is pressed This method should be principally used for long action like running all specs/tests/…
-
#run_on_change(paths) ⇒ Object
Called on file(s) modifications that the Guard watches.
-
#start ⇒ Object
Call once when Guard starts.
Constructor Details
#initialize(watchers = [], options = {}) ⇒ Rna
Initialize a Guard.
11 12 13 14 15 16 17 18 19 |
# File 'lib/guard/rna.rb', line 11 def initialize(watchers = [], = {}) super @results = {} @options = { :all_on_start => true, :templates_path => "templates", :notification => true, }.merge(@options) end |
Instance Method Details
#run_all ⇒ Object
Called when just ‘enter` is pressed This method should be principally used for long action like running all specs/tests/…
30 31 32 |
# File 'lib/guard/rna.rb', line 30 def run_all run! end |
#run_on_change(paths) ⇒ Object
Called on file(s) modifications that the Guard watches.
37 38 39 |
# File 'lib/guard/rna.rb', line 37 def run_on_change(paths) run! end |
#start ⇒ Object
Call once when Guard starts. Please override initialize method to init stuff.
23 24 25 |
# File 'lib/guard/rna.rb', line 23 def start run_all if @options[:all_on_start] end |