Module: MR::AfterCommit::CallbackProcsHash

Defined in:
lib/mr/after_commit/record_procs_methods.rb

Class Method Summary collapse

Class Method Details

.newObject



71
72
73
74
75
76
77
78
79
# File 'lib/mr/after_commit/record_procs_methods.rb', line 71

def self.new
  Hash.new do |h, k|
    if !VALID_CALLBACK_TYPES.include?(k)
      raise ArgumentError, "#{k.inspect} is not a valid callback " \
                           "type, use: #{VALID_CALLBACK_TYPES.join(', ')}"
    end
    h[k] = []
  end
end