Class: Guard::SublimeCtags
Instance Method Summary collapse
- #ctags_file ⇒ Object
- #gen_ctags(files = []) ⇒ Object
-
#initialize(watchers = [], options = {}) ⇒ SublimeCtags
constructor
A new instance of SublimeCtags.
- #reload ⇒ Object
- #run_on_changes(paths) ⇒ Object
- #run_on_removals(paths) ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize(watchers = [], options = {}) ⇒ SublimeCtags
Returns a new instance of SublimeCtags.
8 9 10 |
# File 'lib/guard/sublime-ctags.rb', line 8 def initialize(watchers = [], = {}) super end |
Instance Method Details
#ctags_file ⇒ Object
28 29 30 |
# File 'lib/guard/sublime-ctags.rb', line 28 def ".tags" end |
#gen_ctags(files = []) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/guard/sublime-ctags.rb', line 32 def (files = []) if files.empty? command = "ctags -R -f #{}" puts "exec #{command}" system command else command = "ctags -f #{} --append=yes " + files.map{|f| "'#{f}'" }.join(" ") puts "exec #{command}" system command end end |
#reload ⇒ Object
16 17 18 |
# File 'lib/guard/sublime-ctags.rb', line 16 def reload self. end |
#run_on_changes(paths) ⇒ Object
20 21 22 |
# File 'lib/guard/sublime-ctags.rb', line 20 def run_on_changes(paths) self.(paths) end |
#run_on_removals(paths) ⇒ Object
24 25 26 |
# File 'lib/guard/sublime-ctags.rb', line 24 def run_on_removals(paths) self. end |
#start ⇒ Object
12 13 14 |
# File 'lib/guard/sublime-ctags.rb', line 12 def start self. end |