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
|
# File 'lib/pippi/tasks.rb', line 5
def generate
str = ''
Pippi::CheckSetMapper.new("").predefined_sets.sort.select {|k,v| k != "research" && v.any? }.each do |checkset_name, checks|
str << "### #{checkset_name}\n"
checks.sort.each do |check|
obj = Object.const_get("Pippi::Checks::#{check}::Documentation").new
str << %(
#### #{check}
#{obj.description}
For example, rather than doing this:
\`\`\`ruby
#{obj.sample}
\`\`\`
Instead, consider doing this:
\`\`\`ruby
#{obj.instead_use}
\`\`\`
)
end
end
File.open('doc/docs.md', 'w') { |f| f.syswrite(str) }
end
|