Class: YARD::Templates::Helpers::Markup::RDocMarkup
- Inherits:
-
Object
- Object
- YARD::Templates::Helpers::Markup::RDocMarkup
- Defined in:
- lib/yard/templates/helpers/markup/rdoc_markup.rb
Direct Known Subclasses
Constant Summary
- @@formatter =
nil
- @@markup =
nil
- @@mutex =
nil
Instance Attribute Summary (collapse)
-
- (Object) from_path
Returns the value of attribute from_path.
Instance Method Summary (collapse)
-
- (RDocMarkup) initialize(text)
constructor
A new instance of RDocMarkup.
- - (Object) to_html
Constructor Details
- (RDocMarkup) initialize(text)
Returns a new instance of RDocMarkup
41 42 43 44 45 46 47 |
# File 'lib/yard/templates/helpers/markup/rdoc_markup.rb', line 41 def initialize(text) @text = text @@formatter ||= RDocMarkupToHtml.new @@markup ||= MARKUP.new @@mutex ||= Mutex.new end |
Instance Attribute Details
- (Object) from_path
Returns the value of attribute from_path
35 36 37 |
# File 'lib/yard/templates/helpers/markup/rdoc_markup.rb', line 35 def from_path @from_path end |
Instance Method Details
- (Object) to_html
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/yard/templates/helpers/markup/rdoc_markup.rb', line 49 def to_html html = nil @@mutex.synchronize do @@formatter.from_path = from_path html = @@markup.convert(@text, @@formatter) end html = fix_dash_dash(html) html = fix_typewriter(html) html end |