Class: Guard::MarvFunctions

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of MarvFunctions.



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

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

Instance Method Details

#run_allObject



17
18
19
20
21
22
23
24
# File 'lib/guard/marv/functions.rb', line 17

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

#run_on_change(paths) ⇒ Object

Called on file(s) modifications



27
28
29
30
31
32
33
34
# File 'lib/guard/marv/functions.rb', line 27

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

#startObject



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

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