lib/maglev/active_job/extended_options.rb
# helper method for allowing an option to be configured as either a boolean or a hash,
# with a block option will is used to provide the defaults
helper method for allowing an option to be configured as either a boolean or a hash,
with a block option will is used to provide the defaults
helper method for allowing an option to be configured as either a boolean or a hash with a block option will is used to provide the defaults
def extended_option_config(name, default = {}, &block)
        config = extended_options[name.to_s] || {}
        defaults = block ? block.call : default
        case config
          when true
            defaults
          when false
            nil
          when Hash
            defaults.merge(config)
          else
            config
        end
      end
def extended_option_config ( name , default = { } , & block ) config = extended_options [ name . to_s ] || { } defaults = block ? block . call : default case config when true defaults when false nil when Hash defaults . merge ( config ) else config end end
helper method for allowing an option to be configured as either a boolean or a hash,
with a block option will is used to provide the defaults
helper method for allowing an option to be configured as either a boolean or a hash with a block option will is used to provide the defaults
name
<not_specific>
default
<not_specific>
block
<not_specific>