Class: Dutchman::GhostWriter::AppleScript
- Inherits:
-
Object
- Object
- Dutchman::GhostWriter::AppleScript
show all
- Defined in:
- lib/dutchman/ghost_writer/apple_script/apple_script.rb,
lib/dutchman/ghost_writer/apple_script/command.rb,
lib/dutchman/ghost_writer/apple_script/application.rb
Overview
The current rb_appscript gem said to beware and not to use in new applications. Instead of digging into that application I thought that it be better to simply create a wrapper class that executes the osascript command on the command line.
Defined Under Namespace
Classes: Application, Command
Instance Method Summary
collapse
Instance Method Details
#app(name) ⇒ Object
15
16
17
|
# File 'lib/dutchman/ghost_writer/apple_script/apple_script.rb', line 15
def app(name)
Application.new(self,name)
end
|
#command(applescript) ⇒ Object
23
24
25
|
# File 'lib/dutchman/ghost_writer/apple_script/apple_script.rb', line 23
def command(applescript)
Command.new(self,applescript)
end
|
#execute(applescript) ⇒ Object
19
20
21
|
# File 'lib/dutchman/ghost_writer/apple_script/apple_script.rb', line 19
def execute(applescript)
`#{command(applescript)}`
end
|