Class: Mailscope::Message::Address

Inherits:
Struct
  • Object
show all
Defined in:
lib/mailscope/message.rb

Overview

rubocop:enable Lint/StructNewOverride

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#addressObject

Returns the value of attribute address

Returns:

  • (Object)

    the current value of address



27
28
29
# File 'lib/mailscope/message.rb', line 27

def address
  @address
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



27
28
29
# File 'lib/mailscope/message.rb', line 27

def name
  @name
end

Instance Method Details

#displayObject



28
# File 'lib/mailscope/message.rb', line 28

def display = name.to_s.empty? ? address.to_s : "#{name} <#{address}>"

#shortObject



30
# File 'lib/mailscope/message.rb', line 30

def short = name.to_s.empty? ? address.to_s : name.to_s

#to_hObject



32
# File 'lib/mailscope/message.rb', line 32

def to_h = { name:, address: }