Class: TimeTap::Editors::TextMate

Inherits:
Object
  • Object
show all
Includes:
Appscript
Defined in:
lib/time_tap/editors.rb

Instance Method Summary collapse

Instance Method Details

#current_pathObject

Raises:



14
15
16
17
18
19
# File 'lib/time_tap/editors.rb', line 14

def current_path
  mate = app('TextMate')
  document = mate.document.get
  raise(EditorError) if document.blank?
  path = document.first.path.get rescue nil
end

#is_running?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/time_tap/editors.rb', line 10

def is_running?
  not(`ps -ax -o comm|grep TextMate`.chomp.strip.empty?)
end