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.
17 18 19 20 |
# File 'lib/quby/answers/entities/subscore.rb', line 17 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
22 23 24 |
# File 'lib/quby/answers/entities/subscore.rb', line 22 def value @score_hash[key] end |