Class: AcademicBenchmarks::Standards::Statement

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from InstVarsToHash

#to_h, #to_json, #to_s

Constructor Details

#initialize(descr:) ⇒ Statement

Returns a new instance of Statement.



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

def initialize(descr:)
  @descr = descr
end

Instance Attribute Details

#descrObject Also known as: description

Returns the value of attribute descr.



8
9
10
# File 'lib/academic_benchmarks/standards/statement.rb', line 8

def descr
  @descr
end

Class Method Details

.from_hash(hash) ⇒ Object



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

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