class Array

Public Instance Methods

aindices(o) click to toggle source
# File lib/password_strength_meter.rb, line 102
def aindices(o)
  out = Array.new
  select_with_index { |x, i| 
    out << i if x == o }
   out
end
select_with_index() { |x, index| ... } click to toggle source
# File lib/password_strength_meter.rb, line 97
def select_with_index
  index = -1
  select { |x| index += 1; yield(x, index) }
end