Sha256: fbcac57b4e320331712f3830e3cb05f8506a05cb68f584eff8947222474e0bd3
Contents?: true
Size: 1.86 KB
Versions: 1
Compression:
Stored size: 1.86 KB
Contents
# encoding: utf-8 require 'pathname' require 'delegate' require 'backports' require 'yard' require 'yardstick/ordered_set' require 'yardstick/measurement' require 'yardstick/config' require 'yardstick/report_output' require 'yardstick/document' require 'yardstick/rule' require 'yardstick/rule_config' require 'yardstick/rules/api_tag' require 'yardstick/rules/example_tag' require 'yardstick/rules/summary' require 'yardstick/rules/return_tag' require 'yardstick/measurement_set' require 'yardstick/document_set' require 'yardstick/processor' require 'yardstick/parser' require 'yardstick/yard_ext' require 'yardstick/version' module Yardstick ROOT = Pathname(__FILE__).dirname.parent.expand_path.freeze # Measure a list of files # # @example # config = Yardstick::Config.coerce(path: 'article.rb') # Yardstick.measure(config) # => [ MeasurementSet ] # # @param [Config] config # optional configuration # # @return [Yardstick::MeasurementSet] # the measurements for each file # # @api public def self.measure(config = Config.new) Processor.new(config).process end # Measure a string of code and YARD documentation # # @example # string = "def my_method; end" # # Yardstick.measure_string(string) # => [ Measurement ] # # @param [#to_str] string # the string to measure # @param [Config] config # optional configuration # # @return [Yardstick::MeasurementSet] # the measurements for the string # # @api public def self.measure_string(string, config = Config.new) Processor.new(config).process_string(string) end # Round percentage to 1/10th of a percent # # @param [Float] percentage # the percentage to round # # @return [Float] # the rounded percentage # # @api private def self.round_percentage(percentage) (percentage * 10).floor / 10.0 end end # module Yardstick
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
yardstick-0.9.7 | lib/yardstick.rb |