Class: Quby::Questionnaires::DSL::ScoreBuilder
- Inherits:
-
Object
- Object
- Quby::Questionnaires::DSL::ScoreBuilder
- Defined in:
- lib/quby/questionnaires/dsl/score_builder.rb
Instance Attribute Summary collapse
-
#calculation ⇒ Object
readonly
Returns the value of attribute calculation.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(key, options = {}, &block) ⇒ ScoreBuilder
constructor
A new instance of ScoreBuilder.
Constructor Details
#initialize(key, options = {}, &block) ⇒ ScoreBuilder
Returns a new instance of ScoreBuilder.
12 13 14 |
# File 'lib/quby/questionnaires/dsl/score_builder.rb', line 12 def initialize(key, = {}, &block) @score = Entities::ScoreCalculation.new(key, , &block) end |
Instance Attribute Details
#calculation ⇒ Object (readonly)
Returns the value of attribute calculation.
10 11 12 |
# File 'lib/quby/questionnaires/dsl/score_builder.rb', line 10 def calculation @calculation end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
9 10 11 |
# File 'lib/quby/questionnaires/dsl/score_builder.rb', line 9 def key @key end |
Instance Method Details
#build ⇒ Object
16 17 18 |
# File 'lib/quby/questionnaires/dsl/score_builder.rb', line 16 def build @score end |