Sha256: 6a2a46c63c3c68e40ad317eac8b29f4fb8abd3f3f548bcc9399b02cb3ac74804

Contents?: true

Size: 566 Bytes

Versions: 33

Compression:

Stored size: 566 Bytes

Contents

module NSIndexPathWrap

  # 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
  def [](position)
    raise ArgumentError unless position.is_a?(Integer)
    indexAtPosition(position)
  end

  # Provides an iterator taking a block following the common Ruby idiom.
  # @param [Block]
  # @return [NSIndexPath] the iterated object itself
  def each
    i = 0
    until i == self.length
      yield self.indexAtPosition(i)
      i += 1
    end
    self
  end

end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
bubble-wrap-1.9.7 motion/core/ns_index_path.rb
bubble-wrap-1.9.6 motion/core/ns_index_path.rb
bubble-wrap-1.9.5 motion/core/ns_index_path.rb
bubble-wrap-1.9.4 motion/core/ns_index_path.rb
bubble-wrap-1.9.3 motion/core/ns_index_path.rb
bubble-wrap-1.9.2 motion/core/ns_index_path.rb
bubble-wrap-1.9.1 motion/core/ns_index_path.rb
bubble-wrap-1.9.0 motion/core/ns_index_path.rb
bubble-wrap-1.8.0 motion/core/ns_index_path.rb
bubble-wrap-1.7.1 motion/core/ns_index_path.rb
bubble-wrap-1.7.0 motion/core/ns_index_path.rb
bubble-wrap-1.6.0 motion/core/ns_index_path.rb
bubble-wrap-1.6.0.rc1 motion/core/ns_index_path.rb
bubble-wrap-1.5.0 motion/core/ns_index_path.rb
bubble-wrap-1.5.0.rc1 motion/core/ns_index_path.rb
bubble-wrap-1.4.0 motion/core/ns_index_path.rb
bubble-wrap-1.3.0 motion/core/ns_index_path.rb
bubble-wrap-1.3.0.osx motion/core/ns_index_path.rb
bubble-wrap-1.2.0 motion/core/ns_index_path.rb
bubble-wrap-1.2.0.pre motion/core/ns_index_path.rb