First page Back Continue Last page Overview Graphics


Notes:

(4 secs) This example is taken from the validation_helpers_block plugin for Sequel, which provides a simple DSL for Sequel validations.

The DSL syntax should be fairly straight-forward. Inside the validates block, methods indicate attributes, and inside those blocks, methods indicate the type of validation you are doing.

I'm will be going over how this DSL is implemented, which is actually fairly simple.