Class: Restspec::Docs::DocsRunner

Inherits:
Thor::Group
  • Object
show all
Defined in:
lib/restspec/runners/docs/docs_runner.rb

Defined Under Namespace

Classes: NoValidExtensionError

Constant Summary collapse

TEMPLATE_BY_EXTENSION =
{
  '.md' => 'docs.md.erb',
  '.html' => 'docs.html.slim'
}

Instance Method Summary collapse

Instance Method Details

#generate_docsObject



16
17
18
19
20
21
# File 'lib/restspec/runners/docs/docs_runner.rb', line 16

def generate_docs
  require 'restspec'
  require config_file

  File.write(file, read_template(extension))
end