Class: Guard::SublimeGemtags
- Defined in:
- lib/guard/sublime-gemtags.rb
Instance Method Summary collapse
- #gemtags_file ⇒ Object
- #gen_gemtags(paths = []) ⇒ Object
-
#initialize(watchers = [], options = {}) ⇒ SublimeGemtags
constructor
A new instance of SublimeGemtags.
- #reload ⇒ Object
- #run_on_changes(paths) ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize(watchers = [], options = {}) ⇒ SublimeGemtags
Returns a new instance of SublimeGemtags.
9 10 11 |
# File 'lib/guard/sublime-gemtags.rb', line 9 def initialize(watchers = [], = {}) super end |
Instance Method Details
#gemtags_file ⇒ Object
25 26 27 |
# File 'lib/guard/sublime-gemtags.rb', line 25 def ".gemtags" end |
#gen_gemtags(paths = []) ⇒ Object
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/guard/sublime-gemtags.rb', line 29 def (paths = []) if File.exists?() mtime = paths.map {|path| File.mtime(path) }.max return if mtime && mtime <= File.mtime() end command = "bundle exec gemtags" puts "exec #{command}" system command end |
#reload ⇒ Object
17 18 19 |
# File 'lib/guard/sublime-gemtags.rb', line 17 def reload self. end |
#run_on_changes(paths) ⇒ Object
21 22 23 |
# File 'lib/guard/sublime-gemtags.rb', line 21 def run_on_changes(paths) self.(paths) end |
#start ⇒ Object
13 14 15 |
# File 'lib/guard/sublime-gemtags.rb', line 13 def start self. end |