Class: NSDictionary

Inherits:
Object
  • Object
show all
Defined in:
lib/accessibility/qualifier.rb

Overview

AXElements extensions to NSDictionary.

Instance Method Summary collapse

Instance Method Details

#ax_ppString

Format the hash for AXElements pretty printing.

Returns:

  • (String)


154
155
156
157
158
159
160
161
162
163
164
165
166
# File 'lib/accessibility/qualifier.rb', line 154

def ax_pp
  return '' if empty?

  list = map { |k, v|
    case v
    when Hash
      "#{k}#{v.ax_pp}"
    else
      "#{k}: #{v.inspect}"
    end
  }
  "(#{list.join(', ')})"
end