lib/determinator.rb in determinator-1.1.0 vs lib/determinator.rb in determinator-1.1.1

- old
+ new

@@ -11,10 +11,10 @@ # @param :retrieval [Determinator::Retrieve::Routemaster] A retrieval instance for Features # @param :errors [#call, nil] a proc, accepting an error, which will be called with any errors which occur while determinating # @param :missing_feature [#call, nil] a proc, accepting a feature name, which will be called any time a feature is requested but isn't available # @param :feature_cache [#call, nil] a caching proc, accepting a feature name, which will return the named feature or yield (and store) if not available def configure(retrieval:, errors: nil, missing_feature: nil, feature_cache: nil) - self.on_error_logger(&errors) if errors + self.on_error(&errors) if errors self.on_missing_feature(&missing_feature) if missing_feature @feature_cache = feature_cache if feature_cache.respond_to?(:call) @instance = Control.new(retrieval: retrieval) end