Class: SynapseClient::QuestionSet::Question
- Inherits:
-
Object
- Object
- SynapseClient::QuestionSet::Question
- Defined in:
- lib/synapse_client/question_set.rb
Instance Attribute Summary collapse
-
#answers ⇒ Object
readonly
Returns the value of attribute answers.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#question ⇒ Object
readonly
Returns the value of attribute question.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Question
constructor
A new instance of Question.
Constructor Details
#initialize(opts = {}) ⇒ Question
Returns a new instance of Question.
21 22 23 24 25 |
# File 'lib/synapse_client/question_set.rb', line 21 def initialize(opts = {}) @id = opts.id @question = opts.question @answers = opts.answers.map{|a| Answer.new(a)} end |
Instance Attribute Details
#answers ⇒ Object (readonly)
Returns the value of attribute answers.
19 20 21 |
# File 'lib/synapse_client/question_set.rb', line 19 def answers @answers end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
19 20 21 |
# File 'lib/synapse_client/question_set.rb', line 19 def id @id end |
#question ⇒ Object (readonly)
Returns the value of attribute question.
19 20 21 |
# File 'lib/synapse_client/question_set.rb', line 19 def question @question end |