Class: HunkReviewChanges::App

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/hunk_review_changes/app.rb

Overview

The Sinatra app that serves the review UI and collects per-piece comments. It is configured per run through Sinatra settings so tests can drive it with rack-test against a fixture bundle and a shutdown stub, instead of a real port and exit!.

Class Attribute Summary collapse

Class Attribute Details

.on_doneObject

The shutdown callback is stored outside Sinatra settings on purpose: a setting whose value responds to #call is auto-invoked when read, which would fire the shutdown the moment a route touched it. A plain accessor holds the callable.



42
43
44
# File 'lib/hunk_review_changes/app.rb', line 42

def on_done
  @on_done
end