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

#initialize(text) ⇒ RDocMarkup

Returns a new instance of RDocMarkup.



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

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

Instance Attribute Details

#from_pathObject

Returns the value of attribute from_path.



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

def from_path
  @from_path
end

Instance Method Details

#to_htmlObject



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

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