Module: Kharon::Helpers
- Defined in:
- lib/validate.rb
Instance Method Summary collapse
-
#validate(datas, &block) ⇒ Hash
Validates the datas passed as parameter with a Phenix::Validator and the given instructions.
Instance Method Details
#validate(datas, &block) ⇒ Hash
Validates the datas passed as parameter with a Phenix::Validator and the given instructions.
8 9 10 11 12 |
# File 'lib/validate.rb', line 8 def validate(datas, &block) validator = Kharon::Factory.validator(datas) validator.instance_eval(&block) return validator.filtered end |