Module: Cordon::Sanitaire

Included in:
Object
Defined in:
lib/cordon/sanitaire.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.wrap_assertions_with(custom_method_name) ⇒ Object



9
10
11
# File 'lib/cordon/sanitaire.rb', line 9

def self.wrap_assertions_with(custom_method_name)
  alias_method custom_method_name, :__cordon__assertion_wrapper__
end

Instance Method Details

#__cordon__assertion_wrapper__(predicate) ⇒ Object



4
5
6
7
# File 'lib/cordon/sanitaire.rb', line 4

def __cordon__assertion_wrapper__(predicate)
  ::Cordon::Whitelist.admit_one(predicate)
  return predicate
end