Class: AcademicBenchmarks::Standards::Course
- Inherits:
-
Object
- Object
- AcademicBenchmarks::Standards::Course
- Includes:
- InstVarsToHash
- Defined in:
- lib/academic_benchmarks/standards/course.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
(also: #descr)
Returns the value of attribute description.
-
#guid ⇒ Object
Returns the value of attribute guid.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(guid:, description:) ⇒ Course
constructor
A new instance of Course.
Methods included from InstVarsToHash
Constructor Details
#initialize(guid:, description:) ⇒ Course
Returns a new instance of Course.
16 17 18 19 |
# File 'lib/academic_benchmarks/standards/course.rb', line 16 def initialize(guid:, description:) @guid = guid @description = description end |
Instance Attribute Details
#description ⇒ Object Also known as: descr
Returns the value of attribute description.
8 9 10 |
# File 'lib/academic_benchmarks/standards/course.rb', line 8 def description @description end |
#guid ⇒ Object
Returns the value of attribute guid.
8 9 10 |
# File 'lib/academic_benchmarks/standards/course.rb', line 8 def guid @guid end |
Class Method Details
.from_hash(hash) ⇒ Object
12 13 14 |
# File 'lib/academic_benchmarks/standards/course.rb', line 12 def self.from_hash(hash) self.new(description: hash["descr"], guid: hash["guid"]) end |