Class: NSIndexPath
- Defined in:
- lib/cocoa/sugarcube-to_s/nsindexpath.rb,
lib/cocoa/sugarcube-foundation/nsindexpath.rb
Instance Method Summary collapse
Instance Method Details
#to_a ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/cocoa/sugarcube-foundation/nsindexpath.rb', line 3 def to_a indexes_ptr = Pointer.new(:uint, self.length) self.getIndexes indexes_ptr a = [] self.length.times do |i| a << indexes_ptr[i] end a end |
#to_s ⇒ Object
3 4 5 6 7 |
# File 'lib/cocoa/sugarcube-to_s/nsindexpath.rb', line 3 def to_s return super unless self.respond_to?(:to_a) "<NSIndexPath #{to_a.to_s}>" end |