Class: Quby::Questionnaires::DSL::Questions::TextQuestionBuilder

Inherits:
Base
  • Object
show all
Includes:
RegexpValidations
Defined in:
lib/quby/questionnaires/dsl/questions/text_question_builder.rb

Instance Attribute Summary

Attributes inherited from Base

#key, #questionnaire, #title, #type

Instance Method Summary collapse

Methods included from RegexpValidations

#validates_format_with

Methods inherited from Base

#build, #context_free_title, #default_position, #depends_on, #description, #hidden, #presentation, #validates_presence_of_answer

Methods inherited from Base

build

Methods included from Helpers

#check_question_keys_uniqueness, #image_alt, #image_tag, #video_tag

Constructor Details

#initialize(key, options = {}, &block) ⇒ TextQuestionBuilder

Returns a new instance of TextQuestionBuilder.



10
11
12
13
# File 'lib/quby/questionnaires/dsl/questions/text_question_builder.rb', line 10

def initialize(key, options = {}, &block)
  super
  @question = Entities::Questions::TextQuestion.new(key, options)
end

Instance Method Details

#lines(value) ⇒ Object



15
16
17
# File 'lib/quby/questionnaires/dsl/questions/text_question_builder.rb', line 15

def lines(value)
  @question.lines = value
end