Class: RailsApiDocs::Doc::Responder
- Inherits:
-
Object
- Object
- RailsApiDocs::Doc::Responder
- Defined in:
- lib/rails-api-docs/doc/responder.rb
Overview
Pure-Ruby responder that decides what to serve at /rails/api-docs. Sits between the Rails controller and the Renderer so that the decision logic (file present? render fresh; file missing? show setup page) can be unit-tested without booting a Rails app.
Instance Method Summary collapse
-
#initialize(config_path:) ⇒ Responder
constructor
A new instance of Responder.
-
#render ⇒ Object
Returns [status, html_string].
Constructor Details
#initialize(config_path:) ⇒ Responder
Returns a new instance of Responder.
10 11 12 |
# File 'lib/rails-api-docs/doc/responder.rb', line 10 def initialize(config_path:) @config_path = config_path end |