Class: Rescuetime::Chromium
- Inherits:
-
Application
- Object
- Application
- Rescuetime::Chromium
- Defined in:
- lib/rescuetime/extensions/chromium.rb
Constant Summary collapse
- APPLICATION =
"Chromium-browser"
Instance Attribute Summary
Attributes inherited from Application
#created_at, #finished_at, #title
Instance Method Summary collapse
Methods included from Debug
Methods included from Extension
Methods inherited from Application
#active?, #active_time, create, current_application_name, current_window_title, #extended_info, #finished?, #initialize, #os_username, #to_s, #to_upload_data, to_yaml, #to_yaml
Constructor Details
This class inherits a constructor from Rescuetime::Application
Instance Method Details
#name ⇒ Object
21 22 23 24 25 26 |
# File 'lib/rescuetime/extensions/chromium.rb', line 21 def name ["google mail", "twitter", "facebook"].each do |e| return "#{e} - chromium" if title[e] end "#{title} - chromium" end |
#old_name ⇒ Object
20 |
# File 'lib/rescuetime/extensions/chromium.rb', line 20 alias :old_name :name |
#window_title(given_title) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/rescuetime/extensions/chromium.rb', line 6 def window_title(given_title) title = given_title.gsub(/- Chromium$/, '').strip t = title.downcase if t["google mail"] return "http://www.mail.google.com" elsif t["twitter"] return "http://www.twitter.com" elsif t["facebook"] return "http://www.facebook.com" else return t end end |