Class: Rouge::Formatters::Null

Inherits:
Rouge::Formatter show all
Defined in:
lib/rouge/formatters/null.rb

Overview

A formatter which renders nothing.

Constant Summary

Constants inherited from Rouge::Formatter

Rouge::Formatter::REGISTRY

Instance Method Summary collapse

Methods inherited from Rouge::Formatter

disable_escape!, enable_escape!, #escape?, escape_enabled?, #filter_escapes, find, #format, format, #render, tag, with_escape

Constructor Details

#initializeNull

Returns a new instance of Null.



10
11
# File 'lib/rouge/formatters/null.rb', line 10

def initialize(*)
end

Instance Method Details

#stream(tokens, &b) ⇒ Object



13
14
15
16
17
# File 'lib/rouge/formatters/null.rb', line 13

def stream(tokens, &b)
  tokens.each do |tok, val|
    yield "#{tok.qualname} #{val.inspect}\n"
  end
end