Class: Brainstem::ApiDocs::Formatters::Markdown::EndpointFormatter
- Inherits:
-
AbstractFormatter
- Object
- AbstractFormatter
- Brainstem::ApiDocs::Formatters::Markdown::EndpointFormatter
- Extended by:
- Forwardable
- Includes:
- Helper
- Defined in:
- lib/brainstem/api_docs/formatters/markdown/endpoint_formatter.rb
Instance Attribute Summary collapse
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
-
#output ⇒ Object
Returns the value of attribute output.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(endpoint, options = {}) ⇒ EndpointFormatter
constructor
Public API.
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
Methods included from Concerns::Optional
Constructor Details
#initialize(endpoint, options = {}) ⇒ EndpointFormatter
Public API
21 22 23 24 25 26 |
# File 'lib/brainstem/api_docs/formatters/markdown/endpoint_formatter.rb', line 21 def initialize(endpoint, = {}) self.endpoint = endpoint self.output = "" super end |
Instance Attribute Details
#endpoint ⇒ Object
Returns the value of attribute endpoint.
28 29 30 |
# File 'lib/brainstem/api_docs/formatters/markdown/endpoint_formatter.rb', line 28 def endpoint @endpoint end |
#output ⇒ Object
Returns the value of attribute output.
28 29 30 |
# File 'lib/brainstem/api_docs/formatters/markdown/endpoint_formatter.rb', line 28 def output @output end |
Instance Method Details
#call ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/brainstem/api_docs/formatters/markdown/endpoint_formatter.rb', line 31 def call return output if endpoint.nodoc? format_title! format_description! format_endpoint! format_params! format_presents! output end |