Module: Cuprum::Rails::Actions::ParameterValidation::ClassMethods
- Defined in:
- lib/cuprum/rails/actions/parameter_validation.rb
Overview
Class methods to extend when including the mixin.
Instance Method Summary collapse
Instance Method Details
#validate_parameters(contract) ⇒ Object #validate_parameters { ... } ⇒ Object
26 27 28 29 30 |
# File 'lib/cuprum/rails/actions/parameter_validation.rb', line 26 def validate_parameters(contract = nil, &block) contract ||= Cuprum::Rails::Constraints::ParametersContract.new(&block) define_method(:parameters_contract) { contract } end |