Method: YARD::Templates::Helpers::HtmlHelper#html_markup_ruby

Defined in:
lib/yard/templates/helpers/html_helper.rb

#html_markup_ruby(source) ⇒ String

Highlights Ruby source. Similar to #html_syntax_highlight, but this method is meant to be called from #htmlify when markup is set to “ruby”.

Parameters:

  • source (String)

    the Ruby source

Returns:

  • (String)

    the highlighted HTML

Since:

  • 0.7.0



134
135
136
# File 'lib/yard/templates/helpers/html_helper.rb', line 134

def html_markup_ruby(source)
  '<pre class="code ruby">' + html_syntax_highlight(source, :ruby) + '</pre>'
end