Class: Guard::CtagsComposer
Instance Method Summary collapse
-
#initialize(watchers = [], options = {}) ⇒ CtagsComposer
constructor
A new instance of CtagsComposer.
- #run_on_changes(paths) ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize(watchers = [], options = {}) ⇒ CtagsComposer
Returns a new instance of CtagsComposer.
7 8 9 10 |
# File 'lib/guard/ctags-composer.rb', line 7 def initialize(watchers = [], = {}) super(watchers, ) @ctags_generator = ::Guard::Ctags::Composer::CtagsGenerator.new() end |
Instance Method Details
#run_on_changes(paths) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/guard/ctags-composer.rb', line 18 def run_on_changes(paths) if paths.include?('composer.lock') UI.info "regenerating vendor tags..." @ctags_generator. end ruby_files = paths.reject {|f| f == 'composer.lock'} if ruby_files.any? UI.info "regenerating project tags..." @ctags_generator. end end |
#start ⇒ Object
12 13 14 15 16 |
# File 'lib/guard/ctags-composer.rb', line 12 def start UI.info 'Guard::CtagsComposer is running!' @ctags_generator. @ctags_generator. end |