Module: SmoothOperator::Validations
- Included in:
- OpenStruct
- Defined in:
- lib/smooth_operator/validations.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
- #clear_induced_errors ⇒ Object
- #induce_errors(value) ⇒ Object
- #induced_errors ⇒ Object
- #invalid? ⇒ Boolean
- #valid?(context = nil) ⇒ Boolean
Class Method Details
.included(base) ⇒ Object
24 25 26 |
# File 'lib/smooth_operator/validations.rb', line 24 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#clear_induced_errors ⇒ Object
16 17 18 |
# File 'lib/smooth_operator/validations.rb', line 16 def clear_induced_errors @induced_errors = {} end |
#induce_errors(value) ⇒ Object
20 21 22 |
# File 'lib/smooth_operator/validations.rb', line 20 def induce_errors(value) @induced_errors = value end |
#induced_errors ⇒ Object
12 13 14 |
# File 'lib/smooth_operator/validations.rb', line 12 def induced_errors @induced_errors ||= {} end |
#invalid? ⇒ Boolean
8 9 10 |
# File 'lib/smooth_operator/validations.rb', line 8 def invalid? !valid? end |