Class: Fett::App
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- Fett::App
- Defined in:
- lib/fett/app.rb
Instance Method Summary collapse
Instance Method Details
#transaction(options, &block) ⇒ Object
59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/fett/app.rb', line 59 def transaction(, &block) begin status [:success] response = yield return if [:success] == 204 json response rescue RuntimeError => error status 400 json error: error. end end |