Class: MailParser::RFC2822::AddrSpec

Inherits:
Object
  • Object
show all
Defined in:
lib/mailparser/rfc2822.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(local_part, domain) ⇒ AddrSpec

Returns a new instance of AddrSpec.



74
75
76
77
# File 'lib/mailparser/rfc2822.rb', line 74

def initialize(local_part, domain)
  @local_part = local_part
  @domain = domain
end

Instance Attribute Details

#domainObject (readonly)

Returns the value of attribute domain.



78
79
80
# File 'lib/mailparser/rfc2822.rb', line 78

def domain
  @domain
end

#local_partObject (readonly)

Returns the value of attribute local_part.



78
79
80
# File 'lib/mailparser/rfc2822.rb', line 78

def local_part
  @local_part
end

Instance Method Details

#to_sObject



79
80
81
# File 'lib/mailparser/rfc2822.rb', line 79

def to_s
  "#{@local_part}@#{@domain}"
end