Creating a Custom YARD Setpoint

I have the following method that I would like to document using YARDoc.

# Here is my method
# @arg woop [Woop] *dangerous* this parameter is output to the screen
def shoop(woop)
  puts woop
end

This generates HTML where it is dangeroushighlighted in bold. Since I have to parse this output, I would like to have my own HTML tag. In other words, I would like to make it so that when the following code is executed, the comment parses the YARDocword dangeroussurrounded by tags <div class="custom"></div>, instead of <b><\b>tags, it is much easier to make it out with Nokogiri. Not to say that it is currently impossible to parse Nokogiri, it is a bit more inconvenient and vulnerable to changes to the YARD code.

# Here is my method
# @arg woop [Woop] **dangerous** this parameter is output to the screen
def shoop(woop)
  puts woop
end

- YARD, ? , . , , . , , Google .

HTML-:
, . , "" , , , .

+4
1

Markdown html. , , :

# Here is my method
# @arg woop [Woop] <div class="custom">dangerous</div> this ....
def shoop...
...

, css doc/css/common.css.

+3

All Articles