Sha256: c973f938ecaf27db9cf8e3640818f1b98b75ce6fb36136324c5780f7713fe5ec
Contents?: true
Size: 879 Bytes
Versions: 36
Compression:
Stored size: 879 Bytes
Contents
module Inch module Evaluation # These objects associate a grade with a group of objects # # @see .new_grade_lists class GradeList < Struct.new(:grade) extend Forwardable def_delegators :grade, :scores, :label, :color, :bg_color, :to_s, :to_sym # Returns code_objects that received a score with the defined +scores+ attr_reader :objects # Assigns code_objects that received a score with the defined +scores+ # # @param arr [Array<CodeObject::Proxy>] # @return [Array<CodeObject::Proxy>] def objects=(arr) arr.each { |o| o.grade = grade } @objects = arr end end # Returns newly instanciated grade range objects # # @return [Array<GradeList>] def self.new_grade_lists Evaluation::Grade.all.map { |g| GradeList.new(g) } end end end
Version data entries
36 entries across 36 versions & 1 rubygems