Class: Brainstem::ApiDocs::Formatters::OpenApiSpecification::Version2::ControllerFormatter
- Inherits:
-
AbstractFormatter
- Object
- AbstractFormatter
- Brainstem::ApiDocs::Formatters::OpenApiSpecification::Version2::ControllerFormatter
- Defined in:
- lib/brainstem/api_docs/formatters/open_api_specification/version_2/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 inherited from AbstractFormatter
Constructor Details
#initialize(controller, options = {}) ⇒ ControllerFormatter
Returns a new instance of ControllerFormatter.
26 27 28 29 30 31 32 |
# File 'lib/brainstem/api_docs/formatters/open_api_specification/version_2/controller_formatter.rb', line 26 def initialize(controller, = {}) self.controller = controller self.output = {} self.include_actions = true super end |
Instance Attribute Details
#controller ⇒ Object
Returns the value of attribute controller.
19 20 21 |
# File 'lib/brainstem/api_docs/formatters/open_api_specification/version_2/controller_formatter.rb', line 19 def controller @controller end |
#include_actions ⇒ Object Also known as: include_actions?
Returns the value of attribute include_actions.
19 20 21 |
# File 'lib/brainstem/api_docs/formatters/open_api_specification/version_2/controller_formatter.rb', line 19 def include_actions @include_actions end |
#output ⇒ Object
Returns the value of attribute output.
19 20 21 |
# File 'lib/brainstem/api_docs/formatters/open_api_specification/version_2/controller_formatter.rb', line 19 def output @output end |
Instance Method Details
#call ⇒ Object
34 35 36 37 38 |
# File 'lib/brainstem/api_docs/formatters/open_api_specification/version_2/controller_formatter.rb', line 34 def call return {} if controller.nodoc? format_actions! end |
#valid_options ⇒ Object
Declares the options that are permissable to set on this instance.
13 14 15 16 17 |
# File 'lib/brainstem/api_docs/formatters/open_api_specification/version_2/controller_formatter.rb', line 13 def super | [ :include_actions ] end |