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