lib/bade/ruby_extensions/array.rb
def rcount_matching
    count = 0

    reverse_each do |item|
      break unless yield item

      count += 1
    end

    count
  end
# Returns count of items that matches, iteration starts at the end and stops on first not matching item.
#
# @return [Fixnum] count of items
#
Returns count of items that matches, iteration starts at the end and stops on first not matching item.
Returns count of items that matches iteration starts at the end and stops on first not matching item .
def rcount_matching
    count = 0
    reverse_each do |item|
      break unless yield item
      count += 1
    end
    count
  end
def rcount_matching count = 0 reverse_each do | item | break unless yield item count += 1 end count end
Returns count of items that matches, iteration starts at the end and stops on first not matching item.
Returns count of items that matches iteration starts at the end and stops on first not matching item .
count of items
count of items
Fixnum