Skip to content

Node#parent: fix documentation#326

Closed
paddor wants to merge 1 commit into
socketry:mainfrom
paddor:patch-1
Closed

Node#parent: fix documentation#326
paddor wants to merge 1 commit into
socketry:mainfrom
paddor:patch-1

Conversation

@paddor
Copy link
Copy Markdown
Contributor

@paddor paddor commented Jul 11, 2024

No description provided.

@ioquatix
Copy link
Copy Markdown
Member

Thanks for this.

However, after checking, the syntax of the subsequent attribute is wrong, not this one:

https://github.com/ioquatix/decode/blob/9d6f88e84116d999ddd77eb10a68c2c3417535ba/lib/decode/comment/attribute.rb#L15

The "name" is not a required feature of the attribute tag. So I'll remove the subsequent one and close this PR without merging.

Thanks for your contribution.

@ioquatix ioquatix closed this Jul 11, 2024
ioquatix added a commit that referenced this pull request Jul 11, 2024
See <#326> for background.
@paddor
Copy link
Copy Markdown
Contributor Author

paddor commented Jul 11, 2024

I don't see what's wrong with the subsequent #children attribute. But the documentation of the #parent attribute currently looks like this:

#The parent node.=(parentnode. = (value)) ⇒ Object

The missing name is the only thing I noticed is different from the other attributes.

@ioquatix
Copy link
Copy Markdown
Member

That looks messed up, let me check it.

@ioquatix
Copy link
Copy Markdown
Member

At least according to YARD, I don't think the attribute name is required, especially if it's just repeating what the attribute is already called. Maybe it's something wrong with rubydoc.info? What documentation generation tool are they using?

@paddor
Copy link
Copy Markdown
Contributor Author

paddor commented Jul 15, 2024

Yeah, it should be YARD. It doesn't really now the @attribute directive. It has @!attribute, which is for attributes created with meta-programming.

I usually document normal attributes like this:

      # @return [Messaging::Handlers::Base]
      attr_reader :messaging

It's not very intuitive. Oh well.

Utopia looks very nice but what I miss are superclasses (socketry/utopia-project#3), inherited methods, and private methods. It just makes a quick reading of a method's implementation that much more comprehensible.

@ioquatix
Copy link
Copy Markdown
Member

ioquatix commented Jul 16, 2024

I think we can add those things - let me take a look.

Regarding private methods, I deliberately avoid listing them in the public API documentation to prevent people from using them or expecting them to exist. Do you have a different opinion?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants