-
Notifications
You must be signed in to change notification settings - Fork 1
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:
- You must choose what class element to be added a comment.
- 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.
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.