Class: Jackb::Highlight
- Inherits:
-
Object
- Object
- Jackb::Highlight
- Defined in:
- lib/jackb/highlight.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.render(content) ⇒ Object
6 7 8 |
# File 'lib/jackb/highlight.rb', line 6 def self.render(content) self.new.render(content) end |
Instance Method Details
#render(content) ⇒ Object
10 11 12 13 14 |
# File 'lib/jackb/highlight.rb', line 10 def render(content) content.gsub(highlight_regex) do |s| Albino.new(unescape($2), extract_lang($1)) end end |