lib/maglev/active_job/extended_options.rb
# creates a new job option. Creates both a class level utility method plus instance methods.
# the instance method can be overridden
creates a new job option. Creates both a class level utility method plus instance methods.
the instance method can be overridden
creates a new job option . Creates both a class level utility method plus instance methods . the instance method can be overridden
def extended_option(name, default = nil, internal: false, &block)
          extended_options[name.to_s] = block || default || Proc.new { MagLev.config.active_job.default_options[name] }
          unless internal
            define_singleton_method(name) do |value = nil, &block|
              extended_options[name.to_s] = block || value
            end
          end
        end
def extended_option ( name , default = nil , internal : false , & block ) extended_options [ name . to_s ] = block || default || Proc . new { MagLev . config . active_job . default_options [ name ] } unless internal define_singleton_method ( name ) do | value = nil , & block | extended_options [ name . to_s ] = block || value end end end
creates a new job option.
creates a new job option .
# if a block is provided use that, otherwise use the set value, otherwise use the fallback or default value
name
<not_specific>
default
<not_specific>
internal
<not_specific>
block
<not_specific>