Class: Yardstick::Rake::Verify
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- Yardstick::Rake::Verify
- Defined in:
- lib/yardstick/rake/verify.rb
Overview
A rake task for verifying the doc thresholds
Instance Method Summary collapse
-
#initialize(name = :verify_measurements, options = {}) {|config| ... } ⇒ Yardstick::Rake::Verify
constructor
Initialize a Verify task.
-
#verify_measurements ⇒ undefined
Verify the YARD coverage measurements.
Constructor Details
#initialize(name = :verify_measurements, options = {}) {|config| ... } ⇒ Yardstick::Rake::Verify
Initialize a Verify task
31 32 33 34 35 36 37 38 |
# File 'lib/yardstick/rake/verify.rb', line 31 def initialize(name = :verify_measurements, = {}, &block) @name = name @config = Config.coerce(, &block) @threshold = @config.threshold assert_threshold define end |
Instance Method Details
#verify_measurements ⇒ undefined
Verify the YARD coverage measurements
53 54 55 56 57 |
# File 'lib/yardstick/rake/verify.rb', line 53 def verify_measurements puts "YARD-Coverage: #{total_coverage}% (threshold: #{@threshold}%)" if @config.verbose? assert_meets_threshold assert_matches_threshold end |