class MandrillQueue::Configuration
Constants
- ACCESSORS
Public Class Methods
accessors()
click to toggle source
# File lib/mandrill_queue/configuration.rb, line 38 def self.accessors ACCESSORS end
new(defaults = {}, &block)
click to toggle source
# File lib/mandrill_queue/configuration.rb, line 7 def initialize(defaults = {}, &block) set(defaults) instance_eval(&block) if block_given? end
Public Instance Methods
[](key)
click to toggle source
# File lib/mandrill_queue/configuration.rb, line 16 def [](key) send(key) end
[]=(key, value)
click to toggle source
# File lib/mandrill_queue/configuration.rb, line 12 def []=(key, value) send("#{key}=", value) end
each_key(&block)
click to toggle source
# File lib/mandrill_queue/configuration.rb, line 28 def each_key(&block) ACCESSORS.each(&block) end
reset() { |self| ... }
click to toggle source
# File lib/mandrill_queue/configuration.rb, line 20 def reset ACCESSORS.each do |key| send("#{key}=", nil) end yield self if block_given? end
set(hash)
click to toggle source
# File lib/mandrill_queue/configuration.rb, line 32 def set(hash) each_key do |k, v| send("#{k}=", hash[k]) end end