Class: Mmailer::Worker

Inherits:
Object
  • Object
show all
Defined in:
lib/mmailer/worker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(from) ⇒ Worker

Returns a new instance of Worker.



6
7
8
9
10
11
12
13
# File 'lib/mmailer/worker.rb', line 6

def initialize(from)
  @from = from
  @obj = DRbObject.new_with_uri('druby://localhost:12345')
  meta = { subject: Mmailer.configuration.subject, from:  Mmailer.configuration.from, template: Mmailer.configuration.template, provider: Mmailer.configuration.provider }
  @mailHelper = MailHelper.new(meta)
  load_collection
  exec
end

Instance Attribute Details

#collectionObject (readonly)

two froms, not equal



4
5
6
# File 'lib/mmailer/worker.rb', line 4

def collection
  @collection
end

#fromObject (readonly)

two froms, not equal



4
5
6
# File 'lib/mmailer/worker.rb', line 4

def from
  @from
end

#mail_intervalObject (readonly)

two froms, not equal



4
5
6
# File 'lib/mmailer/worker.rb', line 4

def mail_interval
  @mail_interval
end

#mailHelperObject (readonly)

two froms, not equal



4
5
6
# File 'lib/mmailer/worker.rb', line 4

def mailHelper
  @mailHelper
end

#objObject (readonly)

two froms, not equal



4
5
6
# File 'lib/mmailer/worker.rb', line 4

def obj
  @obj
end

#sleep_timeObject (readonly)

two froms, not equal



4
5
6
# File 'lib/mmailer/worker.rb', line 4

def sleep_time
  @sleep_time
end

#time_intervalObject (readonly)

two froms, not equal



4
5
6
# File 'lib/mmailer/worker.rb', line 4

def time_interval
  @time_interval
end