Class: YARD::Templates::Helpers::Markup::RDocMarkup

Inherits:
Object
  • Object
show all
Defined in:
lib/yard/templates/helpers/markup/rdoc_markup.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (RDocMarkup) initialize(text)

A new instance of RDocMarkup



25
26
27
28
# File 'lib/yard/templates/helpers/markup/rdoc_markup.rb', line 25

def initialize(text)
  @text = text
  @markup = MARKUP.new
end

Instance Attribute Details

- (Object) from_path

Returns the value of attribute from_path



23
24
25
# File 'lib/yard/templates/helpers/markup/rdoc_markup.rb', line 23

def from_path
  @from_path
end

Instance Method Details

- (Object) to_html



30
31
32
33
34
35
36
37
# File 'lib/yard/templates/helpers/markup/rdoc_markup.rb', line 30

def to_html
  formatter = RDocMarkupToHtml.new
  formatter.from_path = from_path
  html = @markup.convert(@text, formatter)
  html = fix_dash_dash(html)
  html = fix_typewriter(html)
  html
end