Module: Inch::Evaluation

Defined in:
lib/inch/evaluation.rb,
lib/inch/evaluation/base.rb,
lib/inch/evaluation/file.rb,
lib/inch/evaluation/role/base.rb,
lib/inch/evaluation/role/method.rb,
lib/inch/evaluation/role/object.rb,
lib/inch/evaluation/score_range.rb,
lib/inch/evaluation/class_object.rb,
lib/inch/evaluation/role/missing.rb,
lib/inch/evaluation/method_object.rb,
lib/inch/evaluation/module_object.rb,
lib/inch/evaluation/role/constant.rb,
lib/inch/evaluation/role/namespace.rb,
lib/inch/evaluation/constant_object.rb,
lib/inch/evaluation/namespace_object.rb,
lib/inch/evaluation/role/method_parameter.rb

Defined Under Namespace

Modules: Role Classes: Base, ClassObject, ConstantObject, File, MethodObject, ModuleObject, NamespaceObject, ScoreRange

Constant Summary collapse

SCORE_RANGE_ARGS =
[
  [80..100, :A, "Seems really good", :green],
  [50...80, :B, "Proper documentation present", :yellow],
  [1...50,  :C, "Needs work", :red],
  [0..0,    :U, "Undocumented", :color141, :color105],
]

Class Method Summary collapse

Class Method Details

.for(code_object) ⇒ Object



3
4
5
# File 'lib/inch/evaluation.rb', line 3

def self.for(code_object)
  class_for(code_object).new(code_object)
end

.new_score_rangesArray<ScoreRange>

Returns newly instanciated score range objects based on SCORE_RANGE_ARGS

Returns:



32
33
34
35
36
# File 'lib/inch/evaluation/score_range.rb', line 32

def self.new_score_ranges
  SCORE_RANGE_ARGS.map do |args|
    ScoreRange.new(*args)
  end
end