Module: Yardstick
- Defined in:
- lib/yardstick.rb,
lib/yardstick/cli.rb,
lib/yardstick/rule.rb,
lib/yardstick/config.rb,
lib/yardstick/parser.rb,
lib/yardstick/version.rb,
lib/yardstick/document.rb,
lib/yardstick/processor.rb,
lib/yardstick/measurement.rb,
lib/yardstick/ordered_set.rb,
lib/yardstick/rake/verify.rb,
lib/yardstick/rule_config.rb,
lib/yardstick/document_set.rb,
lib/yardstick/report_output.rb,
lib/yardstick/rules/api_tag.rb,
lib/yardstick/rules/summary.rb,
lib/yardstick/measurement_set.rb,
lib/yardstick/rake/measurement.rb,
lib/yardstick/rules/return_tag.rb,
lib/yardstick/rules/example_tag.rb
Defined Under Namespace
Modules: Rake, Rules Classes: CLI, Config, Document, DocumentSet, Measurement, MeasurementSet, OrderedSet, Parser, Processor, ReportOutput, Rule, RuleConfig
Constant Summary collapse
- ROOT =
Pathname(__FILE__).dirname.parent..freeze
- VERSION =
Gem version
'0.9.9'.freeze
Class Method Summary collapse
-
.measure(config = Config.new) ⇒ Yardstick::MeasurementSet
Measure a list of files.
-
.measure_string(string, config = Config.new) ⇒ Yardstick::MeasurementSet
Measure a string of code and YARD documentation.
-
.round_percentage(percentage) ⇒ Float
private
Round percentage to 1/10th of a percent.
Class Method Details
.measure(config = Config.new) ⇒ Yardstick::MeasurementSet
Measure a list of files
48 49 50 |
# File 'lib/yardstick.rb', line 48 def self.measure(config = Config.new) Processor.new(config).process end |
.measure_string(string, config = Config.new) ⇒ Yardstick::MeasurementSet
Measure a string of code and YARD documentation
68 69 70 |
# File 'lib/yardstick.rb', line 68 def self.measure_string(string, config = Config.new) Processor.new(config).process_string(string) end |
.round_percentage(percentage) ⇒ Float
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Round percentage to 1/10th of a percent
81 82 83 |
# File 'lib/yardstick.rb', line 81 def self.round_percentage(percentage) (percentage * 10).floor / 10.0 end |