2

Is it possible to have rdoc also show value of constant, not just it's comment? At the moment it's generating

Constants

DEFAULT_CONFIG_FILE

    Default configuration file location

what I would like to get is

Constants

DEFAULT_CONFIG_FILE = '~/config.yaml'

    Default configuration file location

given source code

DEFAULT_CONFIG_FILE = '~/config.yaml'

How can I achieve that?

graywolf
  • 7,092
  • 7
  • 53
  • 77

1 Answers1

1

You have to create a custom template.

Here is the offending line in the template that only shows the name. You'll have to add a reference to const.value.

Maybe something as simple as:

<dt id="<%= const.name %>"><%= const.name %> = <%= const.value %>
Michael Deardeuff
  • 10,386
  • 5
  • 51
  • 74