Class: RakeCheck::Checker::Yard
- Inherits:
-
Base
- Object
- Base
- RakeCheck::Checker::Yard
show all
- Defined in:
- lib/rake_check/checker/yard.rb
Overview
YardChecker checks the output for undocumented classes and methods
Instance Attribute Summary
Attributes inherited from Base
#check_output, #options, #time
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #status, #type
Instance Method Details
#percentage ⇒ Object
23
24
25
|
# File 'lib/rake_check/checker/yard.rb', line 23
def percentage
check_output[/(\d+\.\d+)% documented/, 1].to_f
end
|
#run ⇒ Object
7
8
9
|
# File 'lib/rake_check/checker/yard.rb', line 7
def run
run_command 'yard'
end
|
#short_message ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/rake_check/checker/yard.rb', line 11
def short_message
colored = case percentage
when 0..80
"#{percentage}%".red
when 80..90
"#{percentage}%".yellow
when 90..100
"#{percentage}%".green
end
colored + " documented"
end
|
#success? ⇒ Boolean
27
28
29
|
# File 'lib/rake_check/checker/yard.rb', line 27
def success?
percentage > 80
end
|