Class: DigestNotifier::PerformableDigest

Inherits:
Object
  • Object
show all
Defined in:
lib/digest_notifier/performable_digest.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mailer, method_name, method_args, options) ⇒ PerformableDigest

Returns a new instance of PerformableDigest.



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

def initialize(mailer, method_name, method_args, options)
  #raise NoMethodError, "undefined method `#{method_name}' for #{mailer.inspect}" unless mailer.respond_to?(method_name, true)

  self.mailer       = mailer.to_s
  self.args         = method_args
  self.method_name  = method_name.to_sym
  self.options      = options
end

Instance Attribute Details

#argsObject

Returns the value of attribute args.



3
4
5
# File 'lib/digest_notifier/performable_digest.rb', line 3

def args
  @args
end

#digest_groupObject

Returns the value of attribute digest_group.



3
4
5
# File 'lib/digest_notifier/performable_digest.rb', line 3

def digest_group
  @digest_group
end

#mailerObject

Returns the value of attribute mailer.



3
4
5
# File 'lib/digest_notifier/performable_digest.rb', line 3

def mailer
  @mailer
end

#method_nameObject

Returns the value of attribute method_name.



3
4
5
# File 'lib/digest_notifier/performable_digest.rb', line 3

def method_name
  @method_name
end

#optionsObject

Returns the value of attribute options.



3
4
5
# File 'lib/digest_notifier/performable_digest.rb', line 3

def options
  @options
end

Instance Method Details

#payloadObject



16
17
18
# File 'lib/digest_notifier/performable_digest.rb', line 16

def payload
  args
end