Method: EmailSpec::AddressConverter#conversion
- Defined in:
- lib/email_spec/address_converter.rb
#conversion(&block) ⇒ Object
The block provided to conversion should convert to an email address string or return the input untouched. For example:
EmailSpec::AddressConverter.instance.conversion do |input|
if input.is_a?(User)
input.email
else
input
end
end
20 21 22 |
# File 'lib/email_spec/address_converter.rb', line 20 def conversion(&block) self.converter = block end |