Module: Locomotive::Misc::ApiDocumentation
- Defined in:
- lib/locomotive/misc/api_documentation.rb
Overview
Class to generate the documentation about the LocomotiveCMS Rest API
Defined Under Namespace
Classes: BootstrapRenderer, Parser
Class Method Summary collapse
-
.generate(renderer = nil) ⇒ Object
Generate the documentation depending on the renderer which is by default the BoostrapRenderer.
Class Method Details
.generate(renderer = nil) ⇒ Object
Generate the documentation depending on the renderer which is by default the BoostrapRenderer.
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/locomotive/misc/api_documentation.rb', line 16 def self.generate(renderer = nil) renderer ||= BootstrapRenderer.new raise 'You must provide a renderer' if renderer.nil? parser = Parser.new parser.parse renderer.render(parser.resources) end |