module Para::Config
Public Class Methods
Source
# File lib/para/config.rb, line 105 def self.add_actions_for(*types, &block) types.each do |type| page_actions_for(type) << block end end
Source
# File lib/para/config.rb, line 69 def self.jobs_store @@jobs_store ||= Para::Cache::DatabaseStore.new end
Default to use Para::Cache::DatabaseStore
, allowing cross process and app instances job status sharing
Source
# File lib/para/config.rb, line 61 def self.jobs_store=(store) @@jobs_store = store ActiveJob::Status.store = store end
Allows changing default cache store used by Para
to store jobs through the ActiveJob::Status gem
Source
# File lib/para/config.rb, line 88 def self.method_missing(method_name, *args, &block) if plugins.include?(method_name) plugin = Para::Plugins.module_name_for(method_name).constantize block ? block.call(plugin) : plugin else super end end
Allows accessing plugins root module to configure them through a method from the Para::Config
class.
Example :
Para.config do |config| config.my_plugin.my_var = 'foo' end
Calls superclass method
Source
# File lib/para/config.rb, line 101 def self.page_actions_for(type) page_actions[type] ||= [] end
Source
# File lib/para/config.rb, line 31 def self.plugins=(array) # Add each item in array to the existing plugins set array.each(&plugins.method(:<<)) end