Class: TimeBuffer::OsaScriptApp
- Inherits:
-
Object
- Object
- TimeBuffer::OsaScriptApp
- Defined in:
- lib/time_buffer/osa_script_app.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#bundle_id ⇒ Object
readonly
Returns the value of attribute bundle_id.
Instance Method Summary collapse
-
#initialize(app_bundle_id) ⇒ OsaScriptApp
constructor
A new instance of OsaScriptApp.
- #metadata ⇒ Object
- #name ⇒ Object
Constructor Details
#initialize(app_bundle_id) ⇒ OsaScriptApp
Returns a new instance of OsaScriptApp.
7 8 9 |
# File 'lib/time_buffer/osa_script_app.rb', line 7 def initialize(app_bundle_id) @bundle_id = app_bundle_id end |
Instance Attribute Details
#bundle_id ⇒ Object (readonly)
Returns the value of attribute bundle_id.
5 6 7 |
# File 'lib/time_buffer/osa_script_app.rb', line 5 def bundle_id @bundle_id end |
Instance Method Details
#metadata ⇒ Object
15 |
# File 'lib/time_buffer/osa_script_app.rb', line 15 def = {} |
#name ⇒ Object
11 12 13 |
# File 'lib/time_buffer/osa_script_app.rb', line 11 def name @name ||= `osascript -e 'tell application "System Events" to get name of first application process whose frontmost is true'`.strip end |