forked from cloudfoundry/cloud_controller_ng
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocument_api
executable file
·45 lines (37 loc) · 1019 Bytes
/
document_api
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env ruby
# Copyright (c) 2009-2012 VMware, Inc.
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __FILE__)
$:.unshift(File.expand_path("../../lib", __FILE__))
require "bundler/setup"
require "erb"
require "cloud_controller"
module Docs
class << self
def generate
puts ERB.new(template, nil, "<>").result(binding)
end
def apis
[
VCAP::CloudController::Organization,
VCAP::CloudController::User,
VCAP::CloudController::Space,
VCAP::CloudController::App,
VCAP::CloudController::Service,
VCAP::CloudController::ServicePlan,
VCAP::CloudController::ServiceInstance,
VCAP::CloudController::ServiceBinding,
VCAP::CloudController::ServiceAuthToken
]
end
def top_dir
@top_dir ||= File.expand_path("../../docs", __FILE__)
end
def template_file
File.join(top_dir, "cc_api.md.erb")
end
def template
File.read(template_file)
end
end
end
Docs.generate