lib/sinclair/configurable.rb in sinclair-1.3.3 vs lib/sinclair/configurable.rb in sinclair-1.3.4
- old
+ new
@@ -50,11 +50,11 @@
#
# @see ConfigFactory#child
#
# @return [ConfigFactory]
def config_factory
- @config_factory ||= if superclass.is_a?(Configurable)
+ @config_factory ||= if is_a?(Class) && superclass.is_a?(Configurable)
superclass.config_factory.child
else
ConfigFactory.new
end
end
@@ -69,10 +69,10 @@
# configurations
#
# @see ConfigFactory#add_configs
#
# @example Configuring with common {Sinclair::Config} class
- # class MyConfigurable
+ # module MyConfigurable
# extend Sinclair::Configurable
#
# # port is defaulted to 80
# configurable_with :host, port: 80
# end