Documentation

The API documentation is automatically generated using YARD documentation tool 1.

Code Documentation

Documentation conventions follow the YARD syntax.

Each public/protected/private method, attribute accessor, constant or Ruby statement should be documented, as long as it is part of the public library API.

Public vs Not-Public API

The public API doesn't necessary include only public methods. Protected or private methods can be part of a public API as well. For example, the Whois::Server::Adapters::Base#buffer_append method is a private method, however users are likely to use it when creating a new WHOIS adapter.

Public methods are part of the public API by default. Private and protected methods part of the public API are normally flagged by the @api YARD tag.

# Store an record part in {#buffer}.
#
# @param  [String] body
# @param  [String] host
# @return [void]
#
# @api public
def buffer_append(body, host)
  @buffer << Whois::Record::Part.new(body, host)
end

Each method part of the public API receive a special treatment. It usually includes direct code coverage in the test suite and changes in the library will be planned in order to not break backwards-compatibility in minor and bugfix releases.

Methods part of the private API can be changed at any time without prior notice. You should never monkey-patch or use a private API method directly.

  1. Before the release 2.0, the documentation was generated using RDoc. The reasons behind the change are explained in the post Goodbye RDoc, Welcome Yardoc