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 collapse
- @@mutex =
Mutex.new
- @@formatter =
nil- @@markup =
nil
Instance Attribute Summary collapse
-
#from_path ⇒ Object
Returns the value of attribute from_path.
Instance Method Summary collapse
-
#initialize(text) ⇒ RDocMarkup
constructor
A new instance of RDocMarkup.
- #to_html ⇒ String
Constructor Details
#initialize(text) ⇒ RDocMarkup
Returns a new instance of RDocMarkup.
46 47 48 49 50 51 52 53 |
# File 'lib/yard/templates/helpers/markup/rdoc_markup.rb', line 46 def initialize(text) @text = text @@mutex.synchronize do @@formatter ||= RDocMarkupToHtml.new @@markup ||= MARKUP.new end end |
Instance Attribute Details
#from_path ⇒ Object
Returns the value of attribute from_path.
39 40 41 |
# File 'lib/yard/templates/helpers/markup/rdoc_markup.rb', line 39 def from_path @from_path end |
Instance Method Details
#to_html ⇒ String
56 57 58 59 60 61 62 63 64 65 |
# File 'lib/yard/templates/helpers/markup/rdoc_markup.rb', line 56 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 |