Class: Guard::Config

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

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Config

Returns a new instance of Config.



4
5
6
7
# File 'lib/marv/project/guard/config.rb', line 4

def initialize(options={})
  @builder = Marv::Project::Guard.builder
  super
end

Instance Method Details

#reloadObject

This method should be mainly used for “reload”



10
11
12
13
# File 'lib/marv/project/guard/config.rb', line 10

def reload
  UI.info "Reloading project config"
  @builder.build_project
end

#run_allObject

Runs on all command in guard console



16
17
18
19
# File 'lib/marv/project/guard/config.rb', line 16

def run_all
  UI.info "Reloading project config"
  @builder.build_project
end

#run_on_change(paths) ⇒ Object

Called on file(s) modifications



22
23
24
25
# File 'lib/marv/project/guard/config.rb', line 22

def run_on_change(paths)
  UI.info "Project config changed, reloading"
  @builder.build_project
end