Class: Textorize::RunnerApplication
- Inherits:
-
OSX::NSObject
- Object
- OSX::NSObject
- Textorize::RunnerApplication
- Includes:
- OSX
- Defined in:
- lib/textorize/runner.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#output ⇒ Object
Returns the value of attribute output.
-
#string ⇒ Object
Returns the value of attribute string.
Instance Method Summary collapse
- #applicationDidFinishLaunching(notification) ⇒ Object
-
#initialize ⇒ RunnerApplication
constructor
A new instance of RunnerApplication.
Constructor Details
#initialize ⇒ RunnerApplication
26 27 28 |
# File 'lib/textorize/runner.rb', line 26 def initialize @window = NSWindow.alloc.initWithContentRect_styleMask_backing_defer([-2000, -2000, 2000, 2000], NSBorderlessWindowMask, 2, 0) end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
22 23 24 |
# File 'lib/textorize/runner.rb', line 22 def end |
#output ⇒ Object
Returns the value of attribute output.
24 25 26 |
# File 'lib/textorize/runner.rb', line 24 def output @output end |
#string ⇒ Object
Returns the value of attribute string.
23 24 25 |
# File 'lib/textorize/runner.rb', line 23 def string @string end |
Instance Method Details
#applicationDidFinishLaunching(notification) ⇒ Object
30 31 32 33 34 |
# File 'lib/textorize/runner.rb', line 30 def applicationDidFinishLaunching(notification) renderer = Renderer.new(@window, @string, ) Saver.new(renderer).write_to_file(@output) NSApplication.sharedApplication.terminate(nil) end |