Class: Guard::ForgeTemplates

Inherits:
Guard
  • Object
show all
Defined in:
lib/guard/forge/templates.rb

Instance Method Summary collapse

Constructor Details

#initialize(watchers = [], options = {}) ⇒ ForgeTemplates

Returns a new instance of ForgeTemplates.



6
7
8
# File 'lib/guard/forge/templates.rb', line 6

def initialize(watchers=[], options={})
  super
end

Instance Method Details

#run_allObject



15
16
17
18
19
# File 'lib/guard/forge/templates.rb', line 15

def run_all
  UI.info "Rebuilding all templates"
  ::Forge::Guard.builder.clean_templates
  ::Forge::Guard.builder.copy_templates
end

#run_on_change(paths) ⇒ Object

Called on file(s) modifications



22
23
24
25
26
# File 'lib/guard/forge/templates.rb', line 22

def run_on_change(paths)
  UI.info "Templates have changed, copying over"
  ::Forge::Guard.builder.clean_templates
  ::Forge::Guard.builder.copy_templates
end

#startObject



10
11
12
13
# File 'lib/guard/forge/templates.rb', line 10

def start
  UI.info "Copying templates over"
  ::Forge::Guard.builder.copy_templates
end