Class: Stratagem::Scan::Checks::EmailAddress

Inherits:
Base
  • Object
show all
Includes:
ViewBase
Defined in:
lib/stratagem/scan/checks/email_address.rb

Constant Summary collapse

Scanner =
Regexp.compile(/\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}\b/)

Instance Method Summary collapse

Instance Method Details

#scan(view) ⇒ Object



9
10
11
12
13
# File 'lib/stratagem/scan/checks/email_address.rb', line 9

def scan(view)
  view.scan(Scanner).uniq.each do |email| 
    result(:concern_type => :warning, :unique => email, :payload => email) 
  end
end