Sha256: ac576b21caf878100e6c65d5b5879b77d346fbfe312624a275ac2c09ce5e663a
Contents?: true
Size: 891 Bytes
Versions: 4
Compression:
Stored size: 891 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::Base>] # @return [Array<CodeObject::Proxy::Base>] 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
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
inch-0.4.10 | lib/inch/evaluation/grade_list.rb |
inch-0.4.9 | lib/inch/evaluation/grade_list.rb |
inch-0.4.8 | lib/inch/evaluation/grade_list.rb |
inch-0.4.7 | lib/inch/evaluation/grade_list.rb |