Class: Guard::Templates
- Inherits:
-
Plugin
- Object
- Plugin
- Guard::Templates
- Defined in:
- lib/marv/project/guard/templates.rb
Instance Method Summary collapse
- #copy_all_templates(message, clean = nil) ⇒ Object
-
#initialize(options = {}) ⇒ Templates
constructor
A new instance of Templates.
-
#run_all ⇒ Object
Runs on all command in guard console.
-
#run_on_change(paths) ⇒ Object
Called on file(s) modifications.
-
#start ⇒ Object
Runs on marv watch.
Constructor Details
#initialize(options = {}) ⇒ Templates
Returns a new instance of Templates.
4 5 6 |
# File 'lib/marv/project/guard/templates.rb', line 4 def initialize(={}) super end |
Instance Method Details
#copy_all_templates(message, clean = nil) ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/marv/project/guard/templates.rb', line 23 def copy_all_templates(, clean=nil) builder = Marv::Project::Guard.builder.templates UI.info builder.clean_templates unless clean.nil? builder.copy_templates end |
#run_all ⇒ Object
Runs on all command in guard console
14 15 16 |
# File 'lib/marv/project/guard/templates.rb', line 14 def run_all copy_all_templates "Rebuilding all templates", true end |
#run_on_change(paths) ⇒ Object
Called on file(s) modifications
19 20 21 |
# File 'lib/marv/project/guard/templates.rb', line 19 def run_on_change(paths) copy_all_templates "Templates have changed, copying over" end |
#start ⇒ Object
Runs on marv watch
9 10 11 |
# File 'lib/marv/project/guard/templates.rb', line 9 def start copy_all_templates "Copying templates over" end |