Class: NSObject

Inherits:
Object show all
Defined in:
lib/accessibility/bridge/macruby.rb

Overview

accessibility-core extensions for NSObject

Instance Method Summary collapse

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".

Parameters:

  • seconds (Number) (defaults to: 0)


63
64
65
# File 'lib/accessibility/bridge/macruby.rb', line 63

def spin seconds = 0
  NSRunLoop.currentRunLoop.runUntilDate Time.now + seconds
end

#to_axObject

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_rubyObject

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