Class: ActiveMac::App

Inherits:
Object
  • Object
show all
Defined in:
lib/active_mac/app.rb

Instance Attribute Summary

Attributes inherited from Object

#reference

Class Method Summary collapse

Methods inherited from Object

#initialize

Constructor Details

This class inherits a constructor from ActiveMac::Object

Class Method Details

.find(name) ⇒ Object

Raises:

  • (ArgumentError)


5
6
7
8
# File 'lib/active_mac/app.rb', line 5

def self.find(name)
  raise ArgumentError, "Need to pass in an app name, e.g. ActiveMac::App.find('iTunes')" unless name.instance_of? String
  ActiveMac::Object.new(Appscript.app(name))
end