Skip to content

Allow the use of a Proc to decide if the middleware is enabled#1

Merged
camilo merged 1 commit intomasterfrom
use_proc_for_enable
Feb 6, 2014
Merged

Allow the use of a Proc to decide if the middleware is enabled#1
camilo merged 1 commit intomasterfrom
use_proc_for_enable

Conversation

@camilo
Copy link
Copy Markdown
Owner

@camilo camilo commented Feb 6, 2014

This allows for the middleware enabled state to be controlled via a Proc if need be

@csfrancis @fbogsany makes sense?

@csfrancis
Copy link
Copy Markdown

👍

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sigh I wish Ruby copied Smalltalk's #value method for Object & Proc. Maybe we could monkey-pa...

@fbogsany
Copy link
Copy Markdown

fbogsany commented Feb 6, 2014

LGTM, however we have to be careful with the proc we pass in - if we flip the switch at the wrong time, we'll never disable profiling.

camilo pushed a commit that referenced this pull request Feb 6, 2014
Allow the use of a Proc to decide if the middleware is enabled
@camilo camilo merged commit dddf18c into master Feb 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants