Module: NSIndexPathWrap
- Defined in:
- motion/core/ns_index_path.rb
Instance Method Summary (collapse)
-
- (Integer) [](position)
Gives access to an index at a given position.
-
- (NSIndexPath) each
Provides an iterator taking a block following the common Ruby idiom.
Instance Method Details
- (Integer) [](position)
Gives access to an index at a given position.
6 7 8 9 |
# File 'motion/core/ns_index_path.rb', line 6 def [](position) raise ArgumentError unless position.is_a?(Integer) indexAtPosition(position) end |
- (NSIndexPath) each
Provides an iterator taking a block following the common Ruby idiom.
14 15 16 17 18 19 20 21 |
# 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 |