Class: Grape::Apidoc::RakeTask

Inherits:
Rake::TaskLib
  • Object
show all
Defined in:
lib/grape/apidoc/rake_task.rb

Instance Method Summary collapse

Constructor Details

#initialize(name = :apidoc, root_api_class: nil, output: $stdout) ⇒ RakeTask

Returns a new instance of RakeTask.



2
3
4
5
6
7
8
9
10
# File 'lib/grape/apidoc/rake_task.rb', line 2

def initialize(name = :apidoc, root_api_class: nil, output: $stdout)
  super()

  desc 'Generate markdown documentation for API'
  task(name => :environment) do
    doc = Grape::Apidoc.new(root_api_class, output: output)
    doc.write!
  end
end