Class: Chiketto::Question

Inherits:
Resource show all
Defined in:
lib/chiketto/question.rb

Instance Attribute Summary collapse

Attributes inherited from Resource

#id

Instance Method Summary collapse

Methods inherited from Resource

build_query_string, endpoint, get, #initialize, open_post, paginated, post, should_paginate, token

Methods included from AttrDSL

included

Constructor Details

This class inherits a constructor from Chiketto::Resource

Instance Attribute Details

#requiredObject

Returns the value of attribute required.



3
4
5
# File 'lib/chiketto/question.rb', line 3

def required
  @required
end

#respondentObject

Returns the value of attribute respondent.



3
4
5
# File 'lib/chiketto/question.rb', line 3

def respondent
  @respondent
end

#typeObject

Returns the value of attribute type.



3
4
5
# File 'lib/chiketto/question.rb', line 3

def type
  @type
end

Instance Method Details

#choicesObject



7
8
9
# File 'lib/chiketto/question.rb', line 7

def choices
  @choices.map { |choice| Choice.new choice }
end