Class: SpecyDocs::DocsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/specy_docs/docs_controller.rb

Instance Method Summary collapse

Instance Method Details

#javascriptObject



21
22
23
# File 'app/controllers/specy_docs/docs_controller.rb', line 21

def javascript
  send_frontend('app.js', 'application/javascript')
end

#reportObject



12
13
14
15
16
17
18
19
# File 'app/controllers/specy_docs/docs_controller.rb', line 12

def report
  path = SpecyDocs.configuration.resolved_report_path
  if path.exist?
    send_file path, type: 'application/json', disposition: 'inline'
  else
    render json: {}
  end
end

#showObject



8
9
10
# File 'app/controllers/specy_docs/docs_controller.rb', line 8

def show
  @config = SpecyDocs.configuration
end

#stylesheetObject



25
26
27
# File 'app/controllers/specy_docs/docs_controller.rb', line 25

def stylesheet
  send_frontend('styles.css', 'text/css')
end