Class: NSObject
Overview
accessibility-core
extensions for NSObject
Instance Method Summary collapse
-
#spin(seconds = 0) ⇒ Object
Spin the run loop for the given number of seconds.
-
#to_ax ⇒ Object
Return an object safe for passing to AXAPI.
-
#to_ruby ⇒ Object
Return a usable object from an AXAPI pointer.
Instance Method Details
#spin(seconds = 0) ⇒ Object
Spin the run loop for the given number of seconds
The script will effectively be paused while the run loop is "spinning".
63 64 65 |
# File 'lib/accessibility/bridge/macruby.rb', line 63 def spin seconds = 0 NSRunLoop.currentRunLoop.runUntilDate Time.now + seconds end |
#to_ax ⇒ Object
Return an object safe for passing to AXAPI
40 41 42 |
# File 'lib/accessibility/bridge/macruby.rb', line 40 def to_ax self end |
#to_ruby ⇒ Object
Return a usable object from an AXAPI pointer
Given an arbitrary return value from an AXAPI function this method is called to delegate the work of actually wrapping the returned value in the correct way.
50 51 52 |
# File 'lib/accessibility/bridge/macruby.rb', line 50 def to_ruby self end |