Class: Stockboy::Filters::MissingEmail

Inherits:
Stockboy::Filter show all
Defined in:
lib/stockboy/filters/missing_email.rb

Overview

Very loose matching to pre-screen missing emails.

Only checks if there is a potential email-like string in the output value, and does not do any format checking for validity.

Examples:

filter = Stockboy::Filters::MissingEmail.new(:addr)
model.email = ""
filter.call(_, model) # => false
model.email = "@"
filter.call(_, model) # => true

Instance Method Summary collapse

Methods inherited from Stockboy::Filter

#call

Constructor Details

#initialize(attr) ⇒ MissingEmail

Initialize a new filter for a missing email attribute

Parameters:

  • attr (Symbol)

    Name of the email attribute to examine on the mapped output record



24
25
26
# File 'lib/stockboy/filters/missing_email.rb', line 24

def initialize(attr)
  @attr = attr
end