Class: Quby::Questionnaires::Entities::ScoreCalculation
- Inherits:
-
Object
- Object
- Quby::Questionnaires::Entities::ScoreCalculation
- Defined in:
- lib/quby/questionnaires/entities/score_calculation.rb
Instance Attribute Summary collapse
-
#calculation ⇒ Object
Returns the value of attribute calculation.
-
#key ⇒ Object
Returns the value of attribute key.
-
#label ⇒ Object
Returns the value of attribute label.
-
#options ⇒ Object
Returns the value of attribute options.
-
#sbg_key ⇒ Object
Returns the value of attribute sbg_key.
Instance Method Summary collapse
- #action ⇒ Object
- #completion ⇒ Object
-
#initialize(key, options, &block) ⇒ ScoreCalculation
constructor
A new instance of ScoreCalculation.
- #score ⇒ Object
Constructor Details
#initialize(key, options, &block) ⇒ ScoreCalculation
Returns a new instance of ScoreCalculation.
9 10 11 12 13 14 15 |
# File 'lib/quby/questionnaires/entities/score_calculation.rb', line 9 def initialize(key, , &block) @key = key @label = [:label] @sbg_key = [:sbg_key] @options = @calculation = block end |
Instance Attribute Details
#calculation ⇒ Object
Returns the value of attribute calculation.
7 8 9 |
# File 'lib/quby/questionnaires/entities/score_calculation.rb', line 7 def calculation @calculation end |
#key ⇒ Object
Returns the value of attribute key.
7 8 9 |
# File 'lib/quby/questionnaires/entities/score_calculation.rb', line 7 def key @key end |
#label ⇒ Object
Returns the value of attribute label.
7 8 9 |
# File 'lib/quby/questionnaires/entities/score_calculation.rb', line 7 def label @label end |
#options ⇒ Object
Returns the value of attribute options.
7 8 9 |
# File 'lib/quby/questionnaires/entities/score_calculation.rb', line 7 def @options end |
#sbg_key ⇒ Object
Returns the value of attribute sbg_key.
7 8 9 |
# File 'lib/quby/questionnaires/entities/score_calculation.rb', line 7 def sbg_key @sbg_key end |
Instance Method Details
#action ⇒ Object
25 26 27 |
# File 'lib/quby/questionnaires/entities/score_calculation.rb', line 25 def action @options[:action] end |
#completion ⇒ Object
21 22 23 |
# File 'lib/quby/questionnaires/entities/score_calculation.rb', line 21 def completion @options[:completion] end |
#score ⇒ Object
17 18 19 |
# File 'lib/quby/questionnaires/entities/score_calculation.rb', line 17 def score @options[:score] end |