Class: Quby::Answers::Entities::Subscore
- Inherits:
-
Object
- Object
- Quby::Answers::Entities::Subscore
- Defined in:
- lib/quby/answers/entities/subscore.rb
Overview
Subscore instances describe the subscore keys of answer#scores using score schema information.
Instance Attribute Summary collapse
-
#subschema ⇒ Object
Returns the value of attribute subschema.
Instance Method Summary collapse
-
#initialize(subschema:, score_hash:) ⇒ Subscore
constructor
A new instance of Subscore.
- #value ⇒ Object
Constructor Details
#initialize(subschema:, score_hash:) ⇒ Subscore
Returns a new instance of Subscore.
19 20 21 22 |
# File 'lib/quby/answers/entities/subscore.rb', line 19 def initialize(subschema:, score_hash:) self.subschema = subschema @score_hash = score_hash end |
Instance Attribute Details
#subschema ⇒ Object
Returns the value of attribute subschema.
7 8 9 |
# File 'lib/quby/answers/entities/subscore.rb', line 7 def subschema @subschema end |
Instance Method Details
#value ⇒ Object
24 25 26 |
# File 'lib/quby/answers/entities/subscore.rb', line 24 def value @score_hash[key] end |