instance method
local
Ruby on Rails 2.2.3
Since v2.2.3 Last seen in v2.3.18Available in: v2.2.3 v2.3.18
Signature
local()
Returns the local part of the email address
For Example:
email = TMail::Address.parse("mikel@lindsaar.net") email.local #=> "mikel"
Source
# File actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/address.rb, line 219
def local
return nil unless @local
return '""' if @local.size == 1 and @local[0].empty?
# Check to see if it is an array before trying to map it
if @local.respond_to?(:map)
@local.map {|i| quote_atom(i) }.join('.')
else
quote_atom(@local)
end
end
Defined in actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/address.rb line 219
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in TMail::Address