简体   繁体   中英

Is there a way to force RDoc to not style words, which correspond to classes or modules?

I am trying to write documentation to one of my classes using RDoc and I have the following problem:

This is my source:

module Native
  module Facebook
    # Service, which starts(schedules) Native Facebook Fetching Jobs for users with Facebook platform.
    #
    # *IMPORTANT:* <tt>Native::Facebook::StartFetchingJobs</tt> is intended to be called only from <tt>config/schedule.rb</tt>.
    #
    # For example:
    #   # config/schedule.rb
    #   every :day, at: '7:00 pm' do
    #     runner 'Native::Facebook::StartFetchingJobs.call'
    #   end
    #
    class StartFetchingJobs < Service
      # ...

      def call
        # ...
      end

      # ...
    end
  end
end

This is the screenshot of generated doc:

在此处输入图像描述

Since Native and Facebook are modules, RDoc highlights Native and Facebook words in the generated doc (by green text).

So, my question - is there a way to force RDoc to not style words, which correspond to classes or modules?

All you need to do is just precede your module and class names with a backslash.

So, instead of Native and Facebook , use \Native and \Facebook .

Documentation can be found here . In Escaping Text Markup section.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM