Sha256: 5ba5e932fd456f0e65badb93bf437062d9f4bc9a7d98b2820c59665d909042fa
Contents?: true
Size: 977 Bytes
Versions: 4
Compression:
Stored size: 977 Bytes
Contents
module Inch module Evaluation class ConstantObject < Base DOC_SCORE = MAX_SCORE def evaluate if object.has_doc? add_role Role::Constant::WithDoc.new(object, DOC_SCORE) else add_role Role::Constant::WithoutDoc.new(object, DOC_SCORE) end if object.nodoc? add_role Role::Constant::TaggedAsNodoc.new(object) end if object.has_unconsidered_tags? count = object.unconsidered_tags.size add_role Role::Object::Tagged.new(object, TAGGED_SCORE * count) end if object.in_root? add_role Role::Constant::InRoot.new(object) end if object.public? add_role Role::Constant::Public.new(object) end if object.protected? add_role Role::Constant::Protected.new(object) end if object.private? add_role Role::Constant::Private.new(object) end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems