Class: InchCI::GradeList

Inherits:
Object
  • Object
show all
Defined in:
lib/inch_ci/grade_list_collection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(grade, code_objects) ⇒ GradeList


59
60
61
62
63
64
# File 'lib/inch_ci/grade_list_collection.rb', line 59

def initialize(grade, code_objects)
  code_objects ||= []
  @grade = grade
  @code_objects = code_objects.select { |o| o.grade == grade }
  @count = @code_objects.count
end

Instance Attribute Details

#code_objectsObject (readonly)

Returns the value of attribute code_objects


57
58
59
# File 'lib/inch_ci/grade_list_collection.rb', line 57

def code_objects
  @code_objects
end

#countObject (readonly)

Returns the value of attribute count


57
58
59
# File 'lib/inch_ci/grade_list_collection.rb', line 57

def count
  @count
end

#gradeObject (readonly)

Returns the value of attribute grade


57
58
59
# File 'lib/inch_ci/grade_list_collection.rb', line 57

def grade
  @grade
end