Module: Stove::Mixin::Validatable

Included in:
Plugin::Base
Defined in:
lib/stove/mixins/validatable.rb

Instance Method Summary collapse

Instance Method Details

#validate(id, &block) ⇒ Object



3
4
5
# File 'lib/stove/mixins/validatable.rb', line 3

def validate(id, &block)
  validations[id] = Validator.new(self, id, &block)
end

#validationsObject



7
8
9
# File 'lib/stove/mixins/validatable.rb', line 7

def validations
  @validations ||= {}
end