class Daimon::Markdown::Plugin::Chat
Public Instance Methods
call(*args)
click to toggle source
# File lib/daimon/markdown/plugin/chat.rb, line 7 def call(*args) speaches = [] args.each_slice(2) do |url, text| speaches << <<~SPEACH.chomp <img src="#{url}" /> <p>#{text}</p> SPEACH end html = %Q(<div class="chat">\n#{speaches.join("\n")}\n</div>) node.parent.replace(html) end