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