Class: ActiveSchema::Validations::ValueGenerator
- Inherits:
-
Object
- Object
- ActiveSchema::Validations::ValueGenerator
- Defined in:
- lib/active_schema/validations/generator.rb
Instance Method Summary collapse
-
#initialize(model) ⇒ ValueGenerator
constructor
A new instance of ValueGenerator.
- #validation(name, column, opts = {}) ⇒ Object
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 |