module ThemeOutput
ThemeOutput — apply channel paint overrides to plugin IRC text at runtime. Public: apply, paint_body, wrap_frame Depends: PaintApply, PaintStore Tests: test/lib/theme_output_test.rb
Public Instance Methods
Source
# File lib/theme_output.rb, line 14 def apply(network:, channel:, plugin:, text:, store: RabbotDb) return text.to_s if network.to_s.empty? || channel.to_s.empty? paint_body(network: network, channel: channel, plugin: plugin, text: text, store: store) end
Source
# File lib/theme_output.rb, line 20 def paint_body(network:, channel:, plugin:, text:, store: RabbotDb) overrides = PaintStore.list(network: network, channel: channel, plugin: plugin, store: store) return text.to_s if overrides.empty? lines = PaintApply.to_lines(lines: text.to_s.split("\n"), overrides: overrides) lines.join("\n") end
Source
# File lib/theme_output.rb, line 28 def wrap_frame(network:, channel:, text:, store: RabbotDb) # Themes recolour plugin output via PaintStore overrides only — no live ASCII banners. text.to_s end