Class: Restspec::DocGenerators::Markdown
- Inherits:
-
Object
- Object
- Restspec::DocGenerators::Markdown
- Defined in:
- lib/restspec/doc_generators/markdown.rb
Instance Attribute Summary collapse
-
#markdown_string ⇒ Object
readonly
Returns the value of attribute markdown_string.
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize ⇒ Markdown
constructor
A new instance of Markdown.
Constructor Details
#initialize ⇒ Markdown
Returns a new instance of Markdown.
6 7 8 |
# File 'lib/restspec/doc_generators/markdown.rb', line 6 def initialize self.markdown_string = '' end |
Instance Attribute Details
#markdown_string ⇒ Object
Returns the value of attribute markdown_string.
4 5 6 |
# File 'lib/restspec/doc_generators/markdown.rb', line 4 def markdown_string @markdown_string end |
Instance Method Details
#generate ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/restspec/doc_generators/markdown.rb', line 10 def generate generate_app_header ns_store.each do |ns| markdown_string << "## #{ns.name.capitalize}\n" generate_endpoints(ns) markdown_string << "\n" end markdown_string end |