Module: Validy::Initializer
- Defined in:
- lib/validy.rb
Instance Method Summary collapse
Instance Method Details
#initialize ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/validy.rb', line 16 def initialize(*) @errors = {} @valid = true super # trigger validations if method_presented?(method_without_bang) send(method_without_bang) elsif method_presented?(method_with_bang) send(method_with_bang) else raise NotImplementedError, MUST_BE_IMPLEMENTED_ERROR end end |