class Guard::Templates

Public Class Methods

new(options={}) click to toggle source
Calls superclass method
# File lib/marv/project/guard/templates.rb, line 4
def initialize(options={})
  super
end

Public Instance Methods

copy_all_templates(message, clean=nil) click to toggle source
# File lib/marv/project/guard/templates.rb, line 23
def copy_all_templates(message, clean=nil)
  builder = Marv::Project::Guard.builder.templates

  UI.info message
  builder.clean_templates unless clean.nil?
  builder.copy_templates
end
run_all() click to toggle source

Runs on all command in guard console

# File lib/marv/project/guard/templates.rb, line 14
def run_all
  copy_all_templates "Rebuilding all templates", true
end
run_on_change(paths) click to toggle source

Called on file(s) modifications

# File lib/marv/project/guard/templates.rb, line 19
def run_on_change(paths)
  copy_all_templates "Templates have changed, copying over"
end
start() click to toggle source

Runs on marv watch

# File lib/marv/project/guard/templates.rb, line 9
def start
  copy_all_templates "Copying templates over"
end