Class: AcademicBenchmarks::Standards::Authority
- Inherits:
-
Object
- Object
- AcademicBenchmarks::Standards::Authority
- Includes:
- InstVarsToHash, RemoveObsoleteChildren
- Defined in:
- lib/academic_benchmarks/standards/authority.rb
Instance Attribute Summary collapse
-
#children ⇒ Object
Returns the value of attribute children.
-
#code ⇒ Object
Returns the value of attribute code.
-
#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(code:, guid:, description:, children: []) ⇒ Authority
constructor
A new instance of Authority.
Methods included from RemoveObsoleteChildren
Methods included from InstVarsToHash
Constructor Details
#initialize(code:, guid:, description:, children: []) ⇒ Authority
Returns a new instance of Authority.
22 23 24 25 26 27 |
# File 'lib/academic_benchmarks/standards/authority.rb', line 22 def initialize(code:, guid:, description:, children: []) @code = code @guid = guid @description = description @children = children end |
Instance Attribute Details
#children ⇒ Object
Returns the value of attribute children.
10 11 12 |
# File 'lib/academic_benchmarks/standards/authority.rb', line 10 def children @children end |
#code ⇒ Object
Returns the value of attribute code.
10 11 12 |
# File 'lib/academic_benchmarks/standards/authority.rb', line 10 def code @code end |
#description ⇒ Object Also known as: descr
Returns the value of attribute description.
10 11 12 |
# File 'lib/academic_benchmarks/standards/authority.rb', line 10 def description @description end |
#guid ⇒ Object
Returns the value of attribute guid.
10 11 12 |
# File 'lib/academic_benchmarks/standards/authority.rb', line 10 def guid @guid end |
Class Method Details
.from_hash(hash) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/academic_benchmarks/standards/authority.rb', line 14 def self.from_hash(hash) self.new( code: hash["code"], guid: hash["guid"], description: (hash["descr"] || hash["description"]) ) end |