Class: ActiveSchema::Validations::ByColumn

Inherits:
ValueGenerator show all
Defined in:
lib/active_schema/validations/by_column.rb

Direct Known Subclasses

ByDataType, ByNullability

Instance Method Summary collapse

Constructor Details

#initialize(model, column) ⇒ ByColumn

Returns a new instance of ByColumn.



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

def initialize(model, column)
  super(model)
  @column = column
end

Instance Method Details

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



8
9
10
# File 'lib/active_schema/validations/by_column.rb', line 8

def validation(name, opts = {})
  super(name, @column.name.to_sym, opts)
end