Module: FactoryScenarios

Defined in:
lib/factory_scenarios.rb,
lib/factory_scenarios/engine.rb

Defined Under Namespace

Modules: Mail Classes: AppConfiguration, Engine

Class Method Summary collapse

Class Method Details

.configObject



33
34
35
36
37
38
39
40
41
42
43
# File 'lib/factory_scenarios/engine.rb', line 33

def self.config
  @config ||= AppConfiguration.new(
    :user_class => 'User', 
    :iframe_width => '80%',
    :open_in_iframe => true,
    :factory_scenarios_moneta_backend => :YAML,
    :factory_scenarios_moneta_config => {
      :path => "#{Rails.root.to_s}/db/factory_scenarios.#{Rails.env}.yml"
    }
  )
end

.storageObject



11
12
13
14
15
# File 'lib/factory_scenarios.rb', line 11

def self.storage
  require "moneta/adapters/#{FactoryScenarios.config.factory_scenarios_moneta_backend.to_s.downcase}"
  storage_class = Moneta::Adapters.const_get(FactoryScenarios.config.factory_scenarios_moneta_backend)
  storage_class.new FactoryScenarios.config.factory_scenarios_moneta_config
end