Class: Sinatra::Helpers::HamlErrorPresenter
- Inherits:
-
Ohm::Validations::Presenter
- Object
- Ohm::Validations::Presenter
- Sinatra::Helpers::HamlErrorPresenter
- Defined in:
- lib/sinatra/helpers/haml_error_presenter.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
5 6 7 8 9 |
# File 'lib/sinatra/helpers/haml_error_presenter.rb', line 5 def on(error, = (block_given? ? @context.capture_haml { yield } : raise(ArgumentError))) handle(error) do @output << end end |
#present(context) ⇒ Object
11 12 13 14 |
# File 'lib/sinatra/helpers/haml_error_presenter.rb', line 11 def present(context) @context = context super() end |