Method: RDoc::Markup::ToHtmlSnippet#initialize

Defined in:
lib/rdoc/markup/to_html_snippet.rb

#initialize(options, characters = 100, paragraphs = 3, markup = nil) ⇒ ToHtmlSnippet

Creates a new ToHtmlSnippet formatter that will cut off the input on the next word boundary after the given number of characters or paragraphs of text have been encountered.



37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/rdoc/markup/to_html_snippet.rb', line 37

def initialize options, characters = 100, paragraphs = 3, markup = nil
  super options, markup

  @character_limit = characters
  @paragraph_limit = paragraphs

  @characters = 0
  @mask       = 0
  @paragraphs = 0

  @markup.add_special RDoc::CrossReference::CROSSREF_REGEXP, :CROSSREF
end