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



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

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

Instance Method Details

#copy_functions(message, clean) ⇒ Object

Copy and clean functions and includes folder



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

def copy_functions(message, clean)
  UI.info message
  ::Marv::Guard.builder.copy_functions(clean)
  ::Marv::Guard.builder.copy_includes(clean)
end

#run_allObject

Runs on all command in guard console



17
18
19
# File 'lib/guard/marv/functions.rb', line 17

def run_all
  copy_functions("Rebuilding all functions", true)
end

#run_on_change(paths) ⇒ Object

Called on file(s) modifications



22
23
24
# File 'lib/guard/marv/functions.rb', line 22

def run_on_change(paths)
  copy_functions("Functions have changed, copying over", nil)
end

#startObject

Runs on marv watch



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

def start
  copy_functions("Copying functions over", true)
end