Class: Rescuetime::Gedit

Inherits:
Application show all
Includes:
Extension
Defined in:
lib/rescuetime/extensions/gedit.rb

Constant Summary collapse

APPLICATION =
"Gedit"

Instance Attribute Summary

Attributes inherited from Application

#created_at, #finished_at, #name, #title

Instance Method Summary collapse

Methods included from Extension

extensions, get, included

Methods inherited from Application

#active?, #active_time, create, current_application_name, current_window_title, #finished?, #initialize, #os_username, #to_s, #to_upload_data, to_yaml, #to_yaml

Methods included from Debug

#debug?

Constructor Details

This class inherits a constructor from Rescuetime::Application

Instance Method Details

#extended_infoObject



9
10
11
# File 'lib/rescuetime/extensions/gedit.rb', line 9

def extended_info
  title.match(/\(([^\(]*)\)$/).to_a[1] || ""
end

#window_title(title) ⇒ Object



5
6
7
# File 'lib/rescuetime/extensions/gedit.rb', line 5

def window_title(title)
  (title.start_with?("*") ? title[1..-1] : title).gsub(/- gedit$/, '').strip
end