Sha256: 0091de43946198dd9bfa427d85018662feeabaf41134a76558d55f50dfd954a6
Contents?: true
Size: 570 Bytes
Versions: 34
Compression:
Stored size: 570 Bytes
Contents
# frozen_string_literal: true module Quby module Answers module Services class FiltersAnswerValue def initialize(questionnaire) @questionnaire = questionnaire end def filter(attributes) valid_attribute_keys.each_with_object({}) do |key, obj| obj[key] = attributes.fetch(key, nil) end end private def valid_attribute_keys @valid_attribute_keys ||= %w(aborted) + @questionnaire.answer_keys.map(&:to_s) end end end end end
Version data entries
34 entries across 34 versions & 1 rubygems