Class: DotMailer::FromAddress
- Inherits:
-
Object
- Object
- DotMailer::FromAddress
- Defined in:
- lib/dot_mailer/from_address.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
- #email ⇒ Object
- #id ⇒ Object
-
#initialize(attributes) ⇒ FromAddress
constructor
A new instance of FromAddress.
- #inspect ⇒ Object
- #to_hash ⇒ Object
- #to_s ⇒ Object
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 |
#email ⇒ Object
13 14 15 |
# File 'lib/dot_mailer/from_address.rb', line 13 def email attributes['email'] end |
#id ⇒ Object
9 10 11 |
# File 'lib/dot_mailer/from_address.rb', line 9 def id attributes['id'] end |
#inspect ⇒ Object
29 30 31 |
# File 'lib/dot_mailer/from_address.rb', line 29 def inspect to_s end |
#to_hash ⇒ Object
17 18 19 |
# File 'lib/dot_mailer/from_address.rb', line 17 def to_hash attributes.slice('id', 'email') end |
#to_s ⇒ Object
25 26 27 |
# File 'lib/dot_mailer/from_address.rb', line 25 def to_s %{#{self.class.name} id: #{id}, email: #{email}} end |