diff --git a/lib/kangaru/application.rb b/lib/kangaru/application.rb index 52344a4..7afe9d7 100644 --- a/lib/kangaru/application.rb +++ b/lib/kangaru/application.rb @@ -2,16 +2,19 @@ module Kangaru class Application extend Forwardable - attr_reader :paths, :namespace, :config, :database + attr_reader :paths, :namespace, :database def initialize(source:, namespace:) @paths = Paths.new(source:) @namespace = namespace - @config = Config.new autoloader.setup end + def config + @config ||= Config.new + end + def configure(env = nil, &block) return if env && !Kangaru.env?(env)