Class: PMD::Daemon
- Inherits:
-
Object
- Object
- PMD::Daemon
- Defined in:
- lib/pmd/daemon.rb
Instance Method Summary collapse
- #execute! ⇒ Object
-
#initialize ⇒ Daemon
constructor
A new instance of Daemon.
Constructor Details
#initialize ⇒ Daemon
Returns a new instance of Daemon.
135 136 137 138 139 140 141 142 143 144 |
# File 'lib/pmd/daemon.rb', line 135 def initialize # load up cocoa here instead of as a parent - to avoid weird error each time we run! framework 'Cocoa' # remove any files from previous runner [Config.stop_path, Config.restart_path, Config.pause_path].each do |file| if File.exists? file FileUtils.rm file end end end |
Instance Method Details
#execute! ⇒ Object
146 147 148 149 150 |
# File 'lib/pmd/daemon.rb', line 146 def execute! app = NSApplication.sharedApplication app.delegate = MyAppDelegate.new app.run end |