Class: TimeBuffer::OsaScriptApp

Inherits:
Object
  • Object
show all
Defined in:
lib/time_buffer/osa_script_app.rb

Direct Known Subclasses

OsaScriptAppBrowser

Instance Attribute Summary collapse

Instance Method Summary collapse

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_idObject (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

#metadataObject



15
# File 'lib/time_buffer/osa_script_app.rb', line 15

def  = {}

#nameObject



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