RDoc, somewhat naively, uses the method below to determine if it can use a syntax shortcut.
def parseable? text text =~ /\b(def|class|module|require) |=>|\{\s?\||do \|/ and text !~ /<%|%>/ end
Thus, your code will be highlighted only if it contains one of the following lines:
- Protection
- class
- Module
- required
- =>
- {|
- do |
source share