module Strategize

Constants

InvalidFunctionError

Raised when an object that does not respond to call is provided in [Operation] initialization.

InvalidPolicyEvaluator
InvalidPredicateError

Raised when an object that does not respond to call is provided in [Rule] initialization.

InvalidRuleEvaluator
NotPolicyError

Raised when a class does not include the Stategize::Policy module.

Public Class Methods

configuration() click to toggle source

Get the configuration object for Strategize

@return [Configuration]

# File lib/strategize.rb, line 36
def configuration
  @configuration ||= Configuration.new
end
configure() { |configuration| ... } click to toggle source

Pass a block of code that is executed against the

Configuration

instance

# File lib/strategize.rb, line 49
def configure
  configuration = self.configuration
  yield(configuration)
end
reset_configuration() click to toggle source

Overwrite the current [Configuration] object with a new [Configuration] instance, which returns everything to default

# File lib/strategize.rb, line 43
def reset_configuration
  @configuration = Configuration.new
end