Skip to content

Instantly share code, notes, and snippets.

@dyoder
Created July 22, 2008 02:20
Show Gist options
  • Save dyoder/609 to your computer and use it in GitHub Desktop.
Save dyoder/609 to your computer and use it in GitHub Desktop.
def satisfy?( request )
METHODS.all? do | method |
wanted = instance_variable_get( "@#{method}")
got = request.send( method ) if wanted
wanted.is_a? Proc ? wanted.call( got ) : wanted === got
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment