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)


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

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

#callablize(name) ⇒ Object



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

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