lib/bade/ruby_extensions/array.rb
# Returns index of last matching item when iterating from back to start of +self+.
#
# Returns nil when the first item does not match (when iterating from back).
#
# @return [Fixnum]
#
Returns index of last matching item when iterating from back to start of +self+.
Returns nil when the first item does not match (when iterating from back).
Returns index of last matching item when iterating from back to start of + self + . Returns nil when the first item does not match ( when iterating from back ) .
def rindex_last_matching
    return nil if empty?
    index = nil
    current_index = count - 1
    reverse_each do |item|
      break unless yield item
      index = current_index
      current_index -= 1
    end
    index
  end
def rindex_last_matching return nil if empty? index = nil current_index = count - 1 reverse_each do | item | break unless yield item index = current_index current_index -= 1 end index end
Returns index of last matching item when iterating from back to start of +self+.
Returns index of last matching item when iterating from back to start of + self + .
None
Fixnum