Class: DotMailer::FromAddress

Inherits:
Object
  • Object
show all
Defined in:
lib/dot_mailer/from_address.rb

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ FromAddress

Returns a new instance of FromAddress.



5
6
7
# File 'lib/dot_mailer/from_address.rb', line 5

def initialize(attributes)
  self.attributes = attributes
end

Instance Method Details

#==(other) ⇒ Object



21
22
23
# File 'lib/dot_mailer/from_address.rb', line 21

def ==(other)
  attributes == other.attributes
end

#emailObject



13
14
15
# File 'lib/dot_mailer/from_address.rb', line 13

def email
  attributes['email']
end

#idObject



9
10
11
# File 'lib/dot_mailer/from_address.rb', line 9

def id
  attributes['id']
end

#inspectObject



29
30
31
# File 'lib/dot_mailer/from_address.rb', line 29

def inspect
  to_s
end

#to_hashObject



17
18
19
# File 'lib/dot_mailer/from_address.rb', line 17

def to_hash
  attributes.slice('id', 'email')
end

#to_sObject



25
26
27
# File 'lib/dot_mailer/from_address.rb', line 25

def to_s
  %{#{self.class.name} id: #{id}, email: #{email}}
end