Class: RailsApiDoc::Controller::Response::Rabl
- Inherits:
-
Object
- Object
- RailsApiDoc::Controller::Response::Rabl
- Defined in:
- lib/rails_api_doc/controller/response/rabl.rb
Overview
:nodoc:
Class Attribute Summary collapse
-
.renderer ⇒ Object
Returns the value of attribute renderer.
Instance Attribute Summary collapse
-
#repo ⇒ Object
readonly
Returns the value of attribute repo.
Instance Method Summary collapse
- #construct_controller_template_map ⇒ Object
-
#initialize(controllers) ⇒ Rabl
constructor
pass all controllers registered for api doc TODO: add setting for displaying all from start.
Constructor Details
#initialize(controllers) ⇒ Rabl
pass all controllers registered for api doc TODO: add setting for displaying all from start
20 21 22 23 24 25 26 |
# File 'lib/rails_api_doc/controller/response/rabl.rb', line 20 def initialize(controllers) @controllers = controllers @routes = Rails.application.routes.set.anchored_routes.reject { |r| r.defaults[:internal] } @repo = construct_controller_template_map end |
Class Attribute Details
.renderer ⇒ Object
Returns the value of attribute renderer.
12 13 14 |
# File 'lib/rails_api_doc/controller/response/rabl.rb', line 12 def renderer @renderer end |
Instance Attribute Details
#repo ⇒ Object (readonly)
Returns the value of attribute repo.
16 17 18 |
# File 'lib/rails_api_doc/controller/response/rabl.rb', line 16 def repo @repo end |
Instance Method Details
#construct_controller_template_map ⇒ Object
28 29 30 31 32 |
# File 'lib/rails_api_doc/controller/response/rabl.rb', line 28 def construct_controller_template_map @controllers.each_with_object({}) do |ctrl, repo| repo[ctrl] = ctrl_actions(ctrl) end end |