Class: ActiveSchema::Validations::ValueGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/active_schema/validations/generator.rb

Direct Known Subclasses

ByColumn, ByIndex

Instance Method Summary collapse

Constructor Details

#initialize(model) ⇒ ValueGenerator

Returns a new instance of ValueGenerator.



3
4
5
# File 'lib/active_schema/validations/generator.rb', line 3

def initialize(model)
  @model = model
end

Instance Method Details

#validation(name, column, opts = {}) ⇒ Object



7
8
9
# File 'lib/active_schema/validations/generator.rb', line 7

def validation(name, column, opts = {})
  @model.send(name, column, opts)
end