Class: Brainstem::ApiDocs::Formatters::Markdown::ControllerFormatter
- Inherits:
-
AbstractFormatter
- Object
- AbstractFormatter
- Brainstem::ApiDocs::Formatters::Markdown::ControllerFormatter
- Includes:
- Helper
- Defined in:
- lib/brainstem/api_docs/formatters/markdown/controller_formatter.rb
Instance Attribute Summary collapse
-
#controller ⇒ Object
Returns the value of attribute controller.
-
#include_actions ⇒ Object
(also: #include_actions?)
Returns the value of attribute include_actions.
-
#output ⇒ Object
Returns the value of attribute output.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(controller, options = {}) ⇒ ControllerFormatter
constructor
A new instance of ControllerFormatter.
-
#valid_options ⇒ Object
Declares the options that are permissable to set on this instance.
Methods included from Helper
#md_a, #md_code, #md_h1, #md_h2, #md_h3, #md_h4, #md_h5, #md_hr, #md_inline_code, #md_inline_type, #md_li, #md_p, #md_strong, #md_ul
Methods inherited from AbstractFormatter
Constructor Details
#initialize(controller, options = {}) ⇒ ControllerFormatter
Returns a new instance of ControllerFormatter.
26 27 28 29 30 31 |
# File 'lib/brainstem/api_docs/formatters/markdown/controller_formatter.rb', line 26 def initialize(controller, = {}) self.controller = controller self.output = "" self.include_actions = false super end |
Instance Attribute Details
#controller ⇒ Object
Returns the value of attribute controller.
20 21 22 |
# File 'lib/brainstem/api_docs/formatters/markdown/controller_formatter.rb', line 20 def controller @controller end |
#include_actions ⇒ Object Also known as: include_actions?
Returns the value of attribute include_actions.
20 21 22 |
# File 'lib/brainstem/api_docs/formatters/markdown/controller_formatter.rb', line 20 def include_actions @include_actions end |
#output ⇒ Object
Returns the value of attribute output.
20 21 22 |
# File 'lib/brainstem/api_docs/formatters/markdown/controller_formatter.rb', line 20 def output @output end |
Instance Method Details
#call ⇒ Object
33 34 35 36 37 38 |
# File 'lib/brainstem/api_docs/formatters/markdown/controller_formatter.rb', line 33 def call return output if controller.nodoc? format_title! format_description! format_actions! end |
#valid_options ⇒ Object
Declares the options that are permissable to set on this instance.
14 15 16 17 18 |
# File 'lib/brainstem/api_docs/formatters/markdown/controller_formatter.rb', line 14 def super | [ :include_actions ] end |