Class: WatchedWordListSerializer
Instance Method Summary
collapse
expire_cache_fragment!, fragment_cache
#include!
Instance Method Details
#compiled_regular_expressions ⇒ Object
18
19
20
21
22
23
24
|
# File 'app/serializers/watched_word_list_serializer.rb', line 18
def compiled_regular_expressions
expressions = {}
actions.each do |action|
expressions[action] = WordWatcher.serialized_regexps_for_action(action, engine: :js)
end
expressions
end
|
#words ⇒ Object
14
15
16
|
# File 'app/serializers/watched_word_list_serializer.rb', line 14
def words
object.map { |word| WatchedWordSerializer.new(word, root: false) }
end
|