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
A new instance of EndpointFormatter.
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
Returns a new instance of EndpointFormatter.
23 24 25 26 27 28 |
# File 'lib/brainstem/api_docs/formatters/markdown/endpoint_formatter.rb', line 23 def initialize(endpoint, = {}) self.endpoint = endpoint self.output = "" super end |
Instance Attribute Details
#endpoint ⇒ Object
Returns the value of attribute endpoint.
31 32 33 |
# File 'lib/brainstem/api_docs/formatters/markdown/endpoint_formatter.rb', line 31 def endpoint @endpoint end |
#output ⇒ Object
Returns the value of attribute output.
31 32 33 |
# File 'lib/brainstem/api_docs/formatters/markdown/endpoint_formatter.rb', line 31 def output @output end |
Instance Method Details
#call ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/brainstem/api_docs/formatters/markdown/endpoint_formatter.rb', line 35 def call return output if endpoint.nodoc? format_title! format_description! format_endpoint! format_params! format_presents! output end |