Class: Guard::MarvConfig

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of MarvConfig.



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

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

Instance Method Details

#reloadObject

This method should be mainly used for “reload”



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

def reload
  UI.info "Reloading project config"
  ::Marv::Guard.project.load_config
end

#run_allObject

Runs on all command in guard console



18
19
20
21
22
# File 'lib/guard/marv/config.rb', line 18

def run_all
  UI.info "Reloading project config"
  ::Marv::Guard.project.load_config
  true
end

#run_on_change(paths) ⇒ Object

Called on file(s) modifications



25
26
27
28
29
30
31
32
# File 'lib/guard/marv/config.rb', line 25

def run_on_change(paths)
  UI.info "Project config changed, reloading"
  ::Marv::Guard.project.load_config
  ::Marv::Guard.builder = ::Marv::Builder.new(::Marv::Guard.project)

  # Rebuild everything if the config changes
  ::Marv::Guard.builder.build
end