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

find, format, #format, #render, tag

Constructor Details

#initializeNull

Returns a new instance of Null.


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

def initialize(*)
end

Instance Method Details

#stream(tokens, &b) ⇒ Object


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

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