Module: SeedBuilder
- Defined in:
- lib/seed_builder.rb,
lib/seed_builder/config.rb,
lib/seed_builder/loader.rb,
lib/seed_builder/railtie.rb
Defined Under Namespace
Classes: Config, Loader, Railtie
Constant Summary
collapse
- VERSION =
"1.3.0".freeze
Class Method Summary
collapse
Class Method Details
.config ⇒ Object
10
11
12
|
# File 'lib/seed_builder.rb', line 10
def config
@@config ||= Config.new
end
|
14
15
16
|
# File 'lib/seed_builder.rb', line 14
def configure
yield config
end
|
.logger ⇒ Object
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/seed_builder.rb', line 18
def logger
base_logger = if config.logger
config.logger
elsif defined?(Rails) && Rails.respond_to?(:logger) && Rails.logger
Rails.logger
else
Logger.new($stdout)
end
if base_logger.respond_to?(:tagged)
base_logger
else
ActiveSupport::TaggedLogging.new(base_logger)
end
end
|