Module: Noventius::Report::Dsl::Validations::ClassMethods

Included in:
ClassMethods
Defined in:
lib/noventius/report/dsl/validations.rb

Instance Method Summary collapse

Instance Method Details

#validate(name, rules: {}, messages: {}) ⇒ Object



20
21
22
# File 'lib/noventius/report/dsl/validations.rb', line 20

def validate(name, rules: {}, messages: {})
  validations << Validation.new(name, rules, messages)
end

#validationsObject



16
17
18
# File 'lib/noventius/report/dsl/validations.rb', line 16

def validations
  @validations ||= []
end