Class: Reporter::Record::Response::Token

Inherits:
Base
  • Object
show all
Defined in:
lib/reporter/record/response/token.rb

Overview

Public: Represents a response to a question with token-based

answers.

Call #tokens to get an Array of Strings representing the selected tokens.

Instance Method Summary collapse

Methods included from BaseModule

#question_prompt

Methods inherited from Base

#==, #hash, #initialize

Constructor Details

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

Instance Method Details

#tokensObject

Public: Represents the answered tokens.

Returns an Array of Strings representing the tokens selected.


15
16
17
# File 'lib/reporter/record/response/token.rb', line 15

def tokens
  @tokens ||= @data["tokens"].map(&:to_s)
end