Class: Quby::Answers::Services::FiltersAnswerValue
- Inherits:
-
Object
- Object
- Quby::Answers::Services::FiltersAnswerValue
- Defined in:
- lib/quby/answers/services/filters_answer_value.rb
Instance Method Summary collapse
- #filter(attributes) ⇒ Object
-
#initialize(questionnaire) ⇒ FiltersAnswerValue
constructor
A new instance of FiltersAnswerValue.
Constructor Details
#initialize(questionnaire) ⇒ FiltersAnswerValue
Returns a new instance of FiltersAnswerValue.
7 8 9 |
# File 'lib/quby/answers/services/filters_answer_value.rb', line 7 def initialize(questionnaire) @questionnaire = questionnaire end |
Instance Method Details
#filter(attributes) ⇒ Object
11 12 13 14 15 |
# File 'lib/quby/answers/services/filters_answer_value.rb', line 11 def filter(attributes) valid_attribute_keys.each_with_object({}) do |key, obj| obj[key] = attributes.fetch(key, nil) end end |