lib/bean/nsindexset_additions.rb
#
# Iterate over each of the items in the NSIndexSet
#
# @example
#   s = NSIndexSet.indexSetWithIndexesInRange(NSMakeRange(0, 10))
#   s.each { |i| puts i }
#
# @yield [i] Provides the current index to the given block
# @yieldparam [Fixnum] i The index
# @return [nil]
Iterate over each of the items in the NSIndexSet
Iterate over each of the items in the NSIndexSet
def each
    i = self.firstIndex
    until i == NSNotFound
      yield i
      i = self.indexGreaterThanIndex(i)
    end
  end
def each i = self . firstIndex until i == NSNotFound yield i i = self . indexGreaterThanIndex ( i ) end end
Iterate over each of the items in the NSIndexSet
Iterate over each of the items in the NSIndexSet
None
nil
]
<not_specific>
Provides the current index to the given block
Provides the current index to the given block
<not_specific>
i The index
i The index
example
s = NSIndexSet.indexSetWithIndexesInRange(NSMakeRange(0, 10)) s.each { |i| puts i }
s = NSIndexSet . indexSetWithIndexesInRange ( NSMakeRange ( 0 10 )) s . each { |i| puts i }