Forum: Ruby RDOC nodoc tag

Posted by Thijs De vries (moger777)
on 2013-01-15 16:43
Hey Guys,
Is there a way to turn off the rdoc nodoc tag, for example:

  #:nodoc:
  def not_documented
    puts 'hello'
  end
  #:some_tag_to_reenable_rdoc:

  # I do something
  def document_me
    puts 'world'
  end

Thijs
Posted by Bartosz Dziewoński (matmarex)
on 2013-01-15 17:12
(Received via mailing list)
I think it's #:doc:.
Posted by Damián M. González (igorjorobus)
on 2013-01-15 19:15
#documented

#--
#non documented
#++

#documented
Posted by Ryan Davis (Guest)
on 2013-01-15 21:06
(Received via mailing list)
On Jan 15, 2013, at 07:43 , Thijs De vries <lists@ruby-forum.com> wrote:

> Hey Guys,
> Is there a way to turn off the rdoc nodoc tag, for example:

Do this instead:
Posted by SITKI BAGDAT (Guest)
on 2013-01-15 21:21
(Received via mailing list)
simply using # :doc
Posted by Thijs De vries (moger777)
on 2013-01-15 21:28
#:doc: seems to work.
Posted by Marvin Gülker (quintus)
on 2013-01-16 19:59
Attachment: signature.asc (489 Bytes)
(Received via mailing list)
Am Wed, 16 Jan 2013 00:43:13 +0900
schrieb Thijs De vries <lists@ruby-forum.com>:

>   def document_me
>     puts 'world'
>   end
>
> Thijs
>

This is incorrect usage of the :nodoc: directive. It is meant to be
used like this:

def not_documented # :nodoc:
  puts 'hello'
end

This will automatically make RDoc document anything else but those
methods/modules/classes that are marked with :nodoc:. In order to not
document an entire bunch of methods at once, you can use :stopdoc:
and :startdoc::

def foo
  # Documented
end

# :stopdoc:

def bar
  # Not documented
end

def baz
  # Not documented either
end

# :startdoc:

def blubb
  # Documented again
end

See here: http://rdoc.rubyforge.org/RDoc/Markup.html#label-Directives

Vale,
Marvin

--
Blog: http://pegasus-alpha.eu/blog

ASCII-Ribbon-Kampagne        ()   | ASCII Ribbon Campaign        ()
- Stoppt HTML-E-Mail         /\   | - Against HTML E-Mail        /\
- Stoppt proprietäre Anhänge      | - Against proprietary attachments
www.asciiribbon.org/index-de.html | www.asciiribbon.org
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.