Class: Chatterbox::Email

Inherits:
Object
  • Object
show all
Defined in:
lib/chatterbox/email.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Email

Returns a new instance of Email.



13
14
15
16
# File 'lib/chatterbox/email.rb', line 13

def initialize(options = {})
  @options = options
  validate_options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



11
12
13
# File 'lib/chatterbox/email.rb', line 11

def options
  @options
end

Class Method Details

.deliver(options = {}) ⇒ Object



7
8
9
# File 'lib/chatterbox/email.rb', line 7

def self.deliver(options = {})
  new(options).deliver
end

Instance Method Details

#deliverObject



18
19
20
# File 'lib/chatterbox/email.rb', line 18

def deliver
  Mailer.deliver_message(options)
end