Class: Reporter::Record::Question::Single

Inherits:
Base
  • Object
show all
Defined in:
lib/reporter/record/question/single.rb

Overview

Public: Represents a Reporter survey question with a single

answer.

Instance Method Summary collapse

Methods inherited from Base

#prompt

Methods inherited from Base

#==, #hash, #initialize

Constructor Details

This class inherits a constructor from Reporter::Record::Base

Instance Method Details

#allow_multiple_selection?Boolean

Public: Whether or not the question allows multiple

selections for answers.

Returns:

  • (Boolean)

11
12
13
14
# File 'lib/reporter/record/question/single.rb', line 11

def allow_multiple_selection?
  string_representation = @data["allowMultipleSelection"].to_s
  @allow_multiple_selection ||= (string_representation != "0")
end