Module: Spellr::Validations
- Included in:
- ConfigValidator
- Defined in:
- lib/spellr/validations.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
5 6 7 |
# File 'lib/spellr/validations.rb', line 5 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#errors ⇒ Object
27 28 29 |
# File 'lib/spellr/validations.rb', line 27 def errors @errors ||= [] end |
#valid? ⇒ Boolean
19 20 21 22 23 24 25 |
# File 'lib/spellr/validations.rb', line 19 def valid? self.class.validations.each do |validation| send(validation) end errors.empty? end |