Class: FormKeeper::Constraint::Custom
Instance Method Summary collapse
-
#initialize(block) ⇒ Custom
constructor
A new instance of Custom.
- #validate(value, arg) ⇒ Object
Constructor Details
#initialize(block) ⇒ Custom
Returns a new instance of Custom.
92 93 94 |
# File 'lib/formkeeper.rb', line 92 def initialize(block) @custom = block end |
Instance Method Details
#validate(value, arg) ⇒ Object
95 96 97 |
# File 'lib/formkeeper.rb', line 95 def validate(value, arg) @custom.call(value, arg) end |