Class: Shaf::Generator::Doc

Inherits:
Base
  • Object
show all
Defined in:
lib/shaf/generator/doc.rb

Instance Attribute Summary

Attributes inherited from Base

#args, #options

Instance Method Summary collapse

Methods inherited from Base

identified_by, identifier, #identifier, inherited, #initialize, options, usage

Constructor Details

This class inherits a constructor from Shaf::Generator::Base

Instance Method Details

#callObject



9
10
11
12
13
14
# File 'lib/shaf/generator/doc.rb', line 9

def call
  require 'shaf/yard'
  name = String(args[0]).strip
  Shaf::Yard::Parser.call(name: name)
  YARD::Templates::Engine.render(template: :api_doc, format: :html)
end