Module: SendGrid

Defined in:
lib/send_grid.rb,
lib/send_grid/version.rb,
lib/send_grid/mail_interceptor.rb

Defined Under Namespace

Modules: InstanceMethods Classes: ApiHeader, Config, MailInterceptor

Constant Summary collapse

VERSION =
"2.0.5"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configObject


35
36
37
# File 'lib/send_grid.rb', line 35

def config
  @config ||= SendGrid::Config.new
end

Class Method Details

.configure {|self.config| ... } ⇒ Object

Sendgrid.config will be default if block is not passed

Yields:


40
41
42
# File 'lib/send_grid.rb', line 40

def configure
  yield(self.config) if block_given?
end

.included(base) ⇒ Object


7
8
9
10
11
12
13
14
# File 'lib/send_grid.rb', line 7

def self.included(base)
  base.class_eval do
    include InstanceMethods
    delegate :substitute, :uniq_args, :category, :add_filter_setting, :deliver_at, :to => :sendgrid_header
    alias_method_chain :mail, :sendgrid
    alias_method :sendgrid_header, :send_grid_header
  end
end