Class: Sinatra::OhmErrorHelpers::HamlErrorPresenter
- Inherits:
-
Ohm::Validations::Presenter
- Object
- Ohm::Validations::Presenter
- Sinatra::OhmErrorHelpers::HamlErrorPresenter
- Defined in:
- lib/sinatra/support/ohmerrorhelpers.rb
Overview
Instance Method Summary collapse
- #on(error, message = (block_given? ? @context.capture_haml { yield } : raise(ArgumentError))) ⇒ Object
- #present(context) ⇒ Object
Instance Method Details
#on(error, message = (block_given? ? @context.capture_haml { yield } : raise(ArgumentError))) ⇒ Object
64 65 66 67 68 |
# File 'lib/sinatra/support/ohmerrorhelpers.rb', line 64 def on(error, = (block_given? ? @context.capture_haml { yield } : raise(ArgumentError))) handle(error) do @output << end end |
#present(context) ⇒ Object
70 71 72 73 |
# File 'lib/sinatra/support/ohmerrorhelpers.rb', line 70 def present(context) @context = context super() end |