Sha256: c6b1cc8af00f6d0ce0934f56123be81598dcac3522726112865a7a4704d95bfe
Contents?: true
Size: 475 Bytes
Versions: 28
Compression:
Stored size: 475 Bytes
Contents
class NSIndexPath # support multiple assignment # # example: # a, b = NSIndexPath.indexPathWithIndex(1).indexPathByAddingIndex(3) # a # => 1 # b # => 3 def to_ary to_a end # convert to an array of integers # # example: # path = NSIndexPath.indexPathWithIndex(1).indexPathByAddingIndex(3) # path.to_a # => [1, 3] def to_a self.length.times.reduce([]) do |a, i| a << self.indexAtPosition(i) end end end
Version data entries
28 entries across 28 versions & 1 rubygems