Class: Brightbytes::Sendgrid::Config

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/brightbytes/sendgrid/config.rb

Defined Under Namespace

Classes: UnsubscribeConfig

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dummy_recipientObject

Returns the value of attribute dummy_recipient.



8
9
10
# File 'lib/brightbytes/sendgrid/config.rb', line 8

def dummy_recipient
  @dummy_recipient
end

Instance Method Details

#sendgridObject



14
15
16
# File 'lib/brightbytes/sendgrid/config.rb', line 14

def sendgrid
  @sendgrid ||= Brightbytes::Sendgrid::SmtpApiHeader.new
end

#unsubscribeObject



22
23
24
25
26
27
28
# File 'lib/brightbytes/sendgrid/config.rb', line 22

def unsubscribe
  @unsubscribe ||= UnsubscribeConfig.new(
    [], nil, 
    "If you would like to unsubscribe and stop receiving these emails", "click here",
    "If you would like to unsubscribe and stop receiving these emails click here:"
  )
end

#unsubscribe_categories(*categories) ⇒ Object



30
31
32
# File 'lib/brightbytes/sendgrid/config.rb', line 30

def unsubscribe_categories(*categories)
  unsubscribe.categories = categories.flatten.map(&:to_sym)
end