Class: MonkeyMailer::Email

Inherits:
Object
  • Object
show all
Defined in:
lib/monkey-mailer/email.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash = nil) ⇒ Email

Returns a new instance of Email.



6
7
8
9
10
# File 'lib/monkey-mailer/email.rb', line 6

def initialize(hash=nil)
  unless hash.nil?
    hash.each_pair{|key, value| self.send("#{key}=", value)}
  end
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



4
5
6
# File 'lib/monkey-mailer/email.rb', line 4

def body
  @body
end

#from_emailObject

Returns the value of attribute from_email.



4
5
6
# File 'lib/monkey-mailer/email.rb', line 4

def from_email
  @from_email
end

#from_nameObject

Returns the value of attribute from_name.



4
5
6
# File 'lib/monkey-mailer/email.rb', line 4

def from_name
  @from_name
end

#priorityObject

Returns the value of attribute priority.



4
5
6
# File 'lib/monkey-mailer/email.rb', line 4

def priority
  @priority
end

#subjectObject

Returns the value of attribute subject.



4
5
6
# File 'lib/monkey-mailer/email.rb', line 4

def subject
  @subject
end

#to_emailObject

Returns the value of attribute to_email.



4
5
6
# File 'lib/monkey-mailer/email.rb', line 4

def to_email
  @to_email
end

#to_nameObject

Returns the value of attribute to_name.



4
5
6
# File 'lib/monkey-mailer/email.rb', line 4

def to_name
  @to_name
end