Class: Quby::Questionnaires::DSL::ScoreBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/quby/questionnaires/dsl/score_builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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, options = {}, &block)
  @score = Entities::ScoreCalculation.new(key, options, &block)
end

Instance Attribute Details

#calculationObject (readonly)

Returns the value of attribute calculation.



10
11
12
# File 'lib/quby/questionnaires/dsl/score_builder.rb', line 10

def calculation
  @calculation
end

#keyObject (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

#buildObject



16
17
18
# File 'lib/quby/questionnaires/dsl/score_builder.rb', line 16

def build
  @score
end