Class: Trickster::Renderer::CodeRenderer

Inherits:
Object
  • Object
show all
Defined in:
lib/trickster/renderer/code_renderer.rb

Instance Method Summary collapse

Instance Method Details

#render(io, content, options) ⇒ Object



4
5
6
7
8
# File 'lib/trickster/renderer/code_renderer.rb', line 4

def render(io,content,options)
  content,extension = read_file_if_content_is_filename(content)
  content = wrap_lines_with_callouts(content,options)
  io.puts "<pre><code #{language(options,extension)}data-strikeouts='#{strikes(options)}' data-callout-lines='#{callouts(options)}'>#{content}</code></pre>"
end