rubydocumentation-generationrdoc

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:

enter image description here

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?


Solution

  • 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.