Class: Guard::ForgeFunctions

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of ForgeFunctions.



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

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

Instance Method Details

#run_allObject



16
17
18
19
20
21
22
# File 'lib/guard/forge/functions.rb', line 16

def run_all
  UI.info "Rebuilding all functions"
  ::Forge::Guard.builder.clean_functions
  ::Forge::Guard.builder.copy_functions
  ::Forge::Guard.builder.clean_includes
  ::Forge::Guard.builder.copy_includes
end

#run_on_change(paths) ⇒ Object

Called on file(s) modifications



25
26
27
28
29
30
31
# File 'lib/guard/forge/functions.rb', line 25

def run_on_change(paths)
  UI.info "Functions have changed, copying over"
  ::Forge::Guard.builder.clean_functions
  ::Forge::Guard.builder.copy_functions
  ::Forge::Guard.builder.clean_includes
  ::Forge::Guard.builder.copy_includes
end

#startObject



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

def start
  UI.info "Copying functions over"
  ::Forge::Guard.builder.copy_functions
  ::Forge::Guard.builder.copy_includes
end