lib/haml_lint/utils.rb
def count_consecutive(items, offset, satisfies)
      count = 1
      count += 1 while (offset + count < items.count) && satisfies[items[offset + count]]
      count
    end
# Count the number of consecutive items satisfying the given {Proc}.
#
# @param items [Array]
# @param offset [Fixnum] index to start searching
# @param satisfies [Proc] function to evaluate item with
Count the number of consecutive items satisfying the given {Proc}.
Count the number of consecutive items satisfying the given { Proc } .
def count_consecutive(items, offset, satisfies)
      count = 1
      count += 1 while (offset + count < items.count) && satisfies[items[offset + count]]
      count
    end
def count_consecutive ( items , offset , satisfies ) count = 1 count += 1 while ( offset + count < items . count ) && satisfies [ items [ offset + count ] ] count end
Count the number of consecutive items satisfying the given {Proc}.
Count the number of consecutive items satisfying the given { Proc } .
items
offset
index to start searching
index to start searching
satisfies
function to evaluate item with
function to evaluate item with
None