Skip to content

Commit

Permalink
Add docs to CircuitBreakerMiddleware::should_suppress?
Browse files Browse the repository at this point in the history
  • Loading branch information
Danny Guinther committed Apr 24, 2015
1 parent 01a4ad9 commit 58d477b
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ def self.included(includer)
end

module ClassMethods
# Method indicating whether the circuit breaker has been tripped and whether
# or not the successor should be called. Must be implemeneted by including
# Class/Module.
#
# @param remote_exception [RemotelyExceptional::RemoteException] The remote
# exception that needs handling.
# @raise [NotImplementedError] Raised if the incluing Class or Module does
# not implement it's own should_suppress? method.
# @return [Boolean] A Boolean value indicating whether or not the successor
# should be called. When true, the successor method will not be invoked.
# When false, the successor will be invoked.
def should_suppress?(remote_exception)
raise NotImplementedError, "#{__method__} must be implemented by including class!"
end
Expand Down

0 comments on commit 58d477b

Please sign in to comment.