lib/guard/marv/templates.rb in marv-0.3.0 vs lib/guard/marv/templates.rb in marv-0.3.1

- old
+ new

@@ -6,32 +6,28 @@ def initialize(watchers=[], options={}) super end + # Runs on marv watch def start - UI.info "Copying templates over" - copy_templates + copy_templates("Copying templates over", true) end + # Runs on all command in guard console def run_all - UI.info "Rebuilding all templates" - clean_copy_templates + copy_templates("Rebuilding all templates", true) end # Called on file(s) modifications def run_on_change(paths) - UI.info "Templates have changed, copying over" - clean_copy_templates + copy_templates("Templates have changed, copying over", nil) end - def copy_templates - ::Marv::Guard.builder.copy_templates - end - - def clean_copy_templates - ::Marv::Guard.builder.clean_templates - ::Marv::Guard.builder.copy_templates + # Copy templates + def copy_templates(message, clean) + UI.info message + ::Marv::Guard.builder.copy_templates(clean) end end end