Class: Guard::MarvConfig
- Inherits:
-
Guard
- Object
- Guard
- Guard::MarvConfig
- Defined in:
- lib/guard/marv/config.rb
Instance Method Summary collapse
-
#initialize(watchers = [], options = {}) ⇒ MarvConfig
constructor
A new instance of MarvConfig.
-
#reload ⇒ Object
This method should be mainly used for “reload”.
-
#run_all ⇒ Object
Runs on all command in guard console.
-
#run_on_change(paths) ⇒ Object
Called on file(s) modifications.
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=[], ={}) super end |
Instance Method Details
#reload ⇒ Object
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_all ⇒ Object
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 |