Class: Helena::Version

Inherits:
Object
  • Object
show all
Includes:
Concerns::ApplicationModel, Mongoid::Orderable, Mongoid::Tree
Defined in:
app/models/helena/version.rb

Instance Method Summary collapse

Instance Method Details

#question_code_occurencesObject



35
36
37
# File 'app/models/helena/version.rb', line 35

def question_code_occurences
  question_codes.each_with_object(Hash.new(0)) { |word, counts| counts[word] += 1 }
end

#question_codesObject



27
28
29
# File 'app/models/helena/version.rb', line 27

def question_codes
  question_groups.map(&:question_codes).flatten
end

#question_textsObject



31
32
33
# File 'app/models/helena/version.rb', line 31

def question_texts
  question_groups.map(&:question_texts).flatten
end