module NSIndexPathWrap
Public Instance Methods
+(aNumber)
click to toggle source
# File motion/core/ios/ns_index_path.rb, line 3 def +(aNumber) self.class.indexPathForRow(row+aNumber, inSection:section) end
-(aNumber)
click to toggle source
# File motion/core/ios/ns_index_path.rb, line 7 def -(aNumber) self.class.indexPathForRow(row-aNumber, inSection:section) end
[](position)
click to toggle source
Gives access to an index at a given position. @param [Integer] position to use to fetch the index @return [Integer] the index for the given position
# File motion/core/ns_index_path.rb, line 6 def [](position) raise ArgumentError unless position.is_a?(Integer) indexAtPosition(position) end
each() { |indexAtPosition(i)| ... }
click to toggle source
Provides an iterator taking a block following the common Ruby idiom. @param [Block] @return [NSIndexPath] the iterated object itself
# File motion/core/ns_index_path.rb, line 14 def each i = 0 until i == self.length yield self.indexAtPosition(i) i += 1 end self end