Sha256: 70cdc0911a2d1636a92db18cfdbfca45e75ddfa1f7e68c20c08b47f84cdd8db9
Contents?: true
Size: 382 Bytes
Versions: 5
Compression:
Stored size: 382 Bytes
Contents
module NotifyOn class Utilities def self.callback_method_name(action, options) opts = options.merge(:action => action) opts.each { |k, v| opts[k] = v.to_s.gsub(/\?/, '') } "notify_#{opts[:to]}_on_#{opts[:action]}" + ("_if_#{opts[:if]}" if opts[:if].present?).to_s + ("_unless_#{opts[:unless]}" if opts[:unless].present?).to_s end end end
Version data entries
5 entries across 5 versions & 1 rubygems