Class: AcademicBenchmarks::Standards::EducationLevels

Inherits:
Object
  • Object
show all
Includes:
AttrToVals, InstVarsToHash
Defined in:
lib/academic_benchmarks/standards/education_levels.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from InstVarsToHash

#to_h, #to_json, #to_s

Methods included from AttrToVals

#attr_to_vals

Constructor Details

#initialize(grades:) ⇒ EducationLevels

Returns a new instance of EducationLevels.



16
17
18
# File 'lib/academic_benchmarks/standards/education_levels.rb', line 16

def initialize(grades:)
  @grades = attr_to_vals(Grade, grades)
end

Instance Attribute Details

#gradesObject

Returns the value of attribute grades.



10
11
12
# File 'lib/academic_benchmarks/standards/education_levels.rb', line 10

def grades
  @grades
end

Class Method Details

.from_hash(hash) ⇒ Object



12
13
14
# File 'lib/academic_benchmarks/standards/education_levels.rb', line 12

def self.from_hash(hash)
  self.new(grades: hash["grades"])
end