Proper configuration behavior
This commit is contained in:
parent
e52edb05ac
commit
6a890605f9
@ -11,15 +11,13 @@ module Burlesque
|
||||
|
||||
module Configurable
|
||||
def configure
|
||||
@config ||= Burlesque::Config.new
|
||||
@config ||= Config.new
|
||||
|
||||
yield @config if block_given?
|
||||
end
|
||||
|
||||
def config
|
||||
unless instance_variable_defined?(:@config)
|
||||
raise ConfigurationError.new('Configuration missing')
|
||||
end
|
||||
configure unless instance_variable_defined?(:@config)
|
||||
|
||||
@config
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user