Class: Dinamo::Model::Validation::Validator

Inherits:
Object
  • Object
show all
Defined in:
lib/dinamo/model/validator.rb

Direct Known Subclasses

EachValidator

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**options, &block) ⇒ Validator



9
10
11
12
# File 'lib/dinamo/model/validator.rb', line 9

def initialize(**options, &block)
  @options = options || {}
  @block = block
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



7
8
9
# File 'lib/dinamo/model/validator.rb', line 7

def options
  @options
end

Instance Method Details

#validate(record) ⇒ Object

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/dinamo/model/validator.rb', line 14

def validate(record)
  raise NotImplementedError
end