Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/common/hacks.rb

Direct Known Subclasses

Plugins, Vulnerabilities, WpItems

Instance Method Summary collapse

Instance Method Details

#_grep_(regexp) ⇒ Object Also known as: grep


20
21
22
23
24
25
26
27
# File 'lib/common/hacks.rb', line 20

def _grep_(regexp)
  matches = []
  self.each do |value|
    value = value.to_s
    matches << value if value.match(regexp)
  end
  matches
end