Class: Ohm::Validations::Errors
Instance Attribute Summary (collapse)
-
- (Object) model
Returns the value of attribute model.
Instance Method Summary (collapse)
-
- (Errors) initialize(model)
constructor
A new instance of Errors.
- - (Object) present(presenter = Presenter, &block)
Constructor Details
- (Errors) initialize(model)
A new instance of Errors
53 54 55 |
# File 'lib/ohm/validations.rb', line 53 def initialize(model) @model = model end |
Instance Attribute Details
- (Object) model
Returns the value of attribute model
51 52 53 |
# File 'lib/ohm/validations.rb', line 51 def model @model end |
Instance Method Details
- (Object) present(presenter = Presenter, &block)
57 58 59 |
# File 'lib/ohm/validations.rb', line 57 def present(presenter = Presenter, &block) presenter.new(model.errors).present(&block) end |