Module: Kublog::Network::Email::InstanceMethods

Defined in:
lib/kublog/network/email.rb

Instance Method Summary collapse

Instance Method Details

#default_emailObject

Never send e-mail notification by default



25
26
27
# File 'lib/kublog/network/email.rb', line 25

def default_email
  false
end

#deliver_emailObject

Calls appropriate processor to process e-mail sending to the bulk of users



20
21
22
# File 'lib/kublog/network/email.rb', line 20

def deliver_email
  Processor.work(BulkEmail.new(self))
end

#deliveredObject



34
35
36
37
# File 'lib/kublog/network/email.rb', line 34

def delivered
  self.times_delivered ||= 0
  self.update_attribute :times_delivered, (self.times_delivered + 1)
end

#email?Boolean

Returns true if notification acts as e-mail

Returns:

  • (Boolean)


30
31
32
# File 'lib/kublog/network/email.rb', line 30

def email?
  self.kind == 'email'
end