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’.
-
#only_for_export ⇒ Object
Whether this score will only be exported through oru/api/data exports, but not shown in interfaces.
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 |
#only_for_export ⇒ Object
Whether this score will only be exported through oru/api/data exports, but not shown in interfaces
17 18 19 |
# File 'lib/quby/questionnaires/entities/subscore_schema.rb', line 17 def only_for_export @only_for_export end |
Instance Method Details
#export_key_is_symbol ⇒ Object
27 28 29 |
# File 'lib/quby/questionnaires/entities/subscore_schema.rb', line 27 def export_key_is_symbol errors.add(:export_key, 'is not a symbol') unless export_key.is_a?(Symbol) end |
#key_is_symbol ⇒ Object
23 24 25 |
# File 'lib/quby/questionnaires/entities/subscore_schema.rb', line 23 def key_is_symbol errors.add(:key, 'is not a symbol') unless key.is_a?(Symbol) end |