Class: Aladdin::App
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- Aladdin::App
- Extended by:
- Support::OneOfPattern
- Defined in:
- lib/aladdin/app.rb
Overview
Sinatra app that serves the lesson preview. Should be able to use this in a config.ru file or as middleware. Authors should launch the app using the bin/aladdin
executable.
Instance Method Summary collapse
-
#render_or_pass(&block) ⇒ Object
Calls the given
block
and invokespass
on error.
Methods included from Support::OneOfPattern
Instance Method Details
#render_or_pass(&block) ⇒ Object
Calls the given block
and invokes pass
on error.
49 50 51 52 53 54 55 |
# File 'lib/aladdin/app.rb', line 49 def render_or_pass(&block) begin yield rescue Exception => e logger.error e. pass end end |