Class: Adhoq::Configuration

Inherits:
Object
  • Object
show all
Includes:
ActiveSupport::Configurable
Defined in:
lib/adhoq/configuration.rb

Instance Method Summary collapse

Instance Method Details

#async_execution?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/adhoq/configuration.rb', line 33

def async_execution?
  defined?(ActiveJob) && Adhoq.config.async_execution
end

#callablize(name) ⇒ Object



25
26
27
28
29
30
31
# File 'lib/adhoq/configuration.rb', line 25

def callablize(name)
  if (c = config[name]).respond_to?(:call)
    c
  else
    c.to_proc
  end
end