lib/dry/configurable/extension.rb in dry-configurable-1.1.0 vs lib/dry/configurable/extension.rb in dry-configurable-1.2.0
- old
+ new
@@ -24,21 +24,19 @@
klass.instance_variable_set(:@__config_extension__, self)
end
# @api private
def included(klass)
- raise AlreadyIncludedError if klass.include?(InstanceMethods)
-
super
klass.class_eval do
extend(ClassMethods)
include(InstanceMethods)
prepend(Initializer)
class << self
- undef :config
- undef :configure
+ undef :config if method_defined?(:config)
+ undef :configure if method_defined?(:configure)
end
end
klass.instance_variable_set(:@__config_extension__, self)
end