lib/hanami/components.rb in hanami-0.9.2 vs lib/hanami/components.rb in hanami-1.0.0.beta1

- old
+ new

@@ -99,9 +99,20 @@ @_resolved.fetch(name) do raise ArgumentError.new("Component not resolved: `#{name}'.\nResolved components are: #{@_resolved.keys.join(', ')}") end end + # Release all the resolved components. + # This is used for code reloading. + # + # NOTE: this MUST NOT be used unless you know what you're doing. + # + # @since 1.0.0.beta1 + # @api private + def self.release + @_resolved.clear + end + require 'hanami/components/component' require 'hanami/components/components' end end