Class: Quby::Questionnaires::Entities::SubscoreSchema
- Inherits:
-
Object
- Object
- Quby::Questionnaires::Entities::SubscoreSchema
- Includes:
- ActiveModel::Model
- Defined in:
- lib/quby/questionnaires/entities/subscore_schema.rb
Overview
SubscoreSchema instances describe each key that could be returned in a score result hash
Instance Attribute Summary collapse
-
#export_key ⇒ Object
The shortened key that will used as the field/column name for csv and oru exports, excluding the questionnaire key part.
-
#key ⇒ Object
The key this subscore has in the hash returned by the score.
-
#label ⇒ Object
The description of this subscore in the context of the score, like ‘Mean’, ‘T-Score’ or ‘Interpretation’.
Instance Method Summary collapse
Instance Attribute Details
#export_key ⇒ Object
The shortened key that will used as the field/column name for csv and oru exports, excluding the questionnaire key part
15 16 17 |
# File 'lib/quby/questionnaires/entities/subscore_schema.rb', line 15 def export_key @export_key end |
#key ⇒ Object
The key this subscore has in the hash returned by the score
10 11 12 |
# File 'lib/quby/questionnaires/entities/subscore_schema.rb', line 10 def key @key end |
#label ⇒ Object
The description of this subscore in the context of the score, like ‘Mean’, ‘T-Score’ or ‘Interpretation’
12 13 14 |
# File 'lib/quby/questionnaires/entities/subscore_schema.rb', line 12 def label @label end |
Instance Method Details
#export_key_is_symbol ⇒ Object
25 26 27 |
# File 'lib/quby/questionnaires/entities/subscore_schema.rb', line 25 def export_key_is_symbol errors.add(:export_key, 'is not a symbol') unless export_key.is_a?(Symbol) end |
#key_is_symbol ⇒ Object
21 22 23 |
# File 'lib/quby/questionnaires/entities/subscore_schema.rb', line 21 def key_is_symbol errors.add(:key, 'is not a symbol') unless key.is_a?(Symbol) end |