Class: RailsAutodoc::SpecController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/rails_autodoc/spec_controller.rb

Class Attribute Summary collapse

Instance Method Summary collapse

Class Attribute Details

.cached_specObject

Returns the value of attribute cached_spec.



49
50
51
# File 'app/controllers/rails_autodoc/spec_controller.rb', line 49

def cached_spec
  @cached_spec
end

Instance Method Details

#showObject



5
6
7
8
# File 'app/controllers/rails_autodoc/spec_controller.rb', line 5

def show
  spec = cached_spec
  render json: spec
end

#uiObject



10
11
12
# File 'app/controllers/rails_autodoc/spec_controller.rb', line 10

def ui
  render html: swagger_ui_html.html_safe
end