Class: Guard::RakeTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- Guard::RakeTask
- Defined in:
- lib/guard/rake_task.rb
Overview
Provides a method to define a Rake task that runs the Guard plugins.
Instance Attribute Summary collapse
-
#name ⇒ Object
Name of the main, top level task.
-
#options ⇒ Object
CLI options.
Instance Method Summary collapse
-
#initialize(name = :guard, options = "") {|Guard::RakeTask| ... } ⇒ RakeTask
constructor
Initialize the Rake task.
Constructor Details
#initialize(name = :guard, options = "") {|Guard::RakeTask| ... } ⇒ RakeTask
Initialize the Rake task
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/guard/rake_task.rb', line 25 def initialize(name = :guard, = "") @name = name @options = yield self if block_given? desc "Starts Guard with options: '#{}'" task name => ["#{name}:start"] namespace(name) do desc "Starts Guard with options: '#{}'" task(:start) do ::Guard::CLI.start(.split) end end end |
Instance Attribute Details
#name ⇒ Object
Name of the main, top level task
14 15 16 |
# File 'lib/guard/rake_task.rb', line 14 def name @name end |
#options ⇒ Object
CLI options
17 18 19 |
# File 'lib/guard/rake_task.rb', line 17 def @options end |