Class: Banzai::Filter::BroadcastMessagePlaceholdersFilter

Inherits:
HTML::Pipeline::Filter
  • Object
show all
Defined in:
lib/banzai/filter/broadcast_message_placeholders_filter.rb

Overview

Replaces placeholders for broadcast messages with data from the current user or the instance.

Instance Method Summary collapse

Instance Method Details

#callObject


8
9
10
11
12
# File 'lib/banzai/filter/broadcast_message_placeholders_filter.rb', line 8

def call
  return doc unless context[:broadcast_message_placeholders]

  doc.traverse { |node| replace_placeholders(node) }
end