class Array
def count(&action)
def count(&action) count = 0 self.each { |v| count = count + 1} self.each { |v| count = count + 1 if action.call(v) } return count end
def count(&action) count = 0 self.each { |v| count = count + 1} self.each { |v| count = count + 1 if action.call(v) } return count end