Skip to content

Code Comment

Andrias Meisyal edited this page Mar 11, 2017 · 2 revisions

You can add code documentation to your class elements. Code documentation is like a code comment. Adding it is simple:

  1. You must choose what class element to be added a comment.
  2. Then, write the comment in the Documentation box (part of Editors on the right side).

For example, this picture below shows a class, Author, with class element selected.

Code Comment

If you generate Ruby code with this extension, the generated code is shown as follows:

author.rb

# This is "Author" class
class Author
  def initialize(name, email)
    @name = name
    @email = email
  end

  private
    attr_accessor :name, :email

  def to_s
    "Your string representation of the object will be written here."
  end
end

Note that you can turn off this feature on extension configuration.

Clone this wiki locally