Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix annotation in CodeObjects::Base#files #1178

Merged
merged 2 commits into from Aug 11, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/yard/code_objects/base.rb
Expand Up @@ -132,7 +132,7 @@ def push(value)
# @see NamespaceMapper.register_separator
class Base
# The files the object was defined in. To add a file, use {#add_file}.
# @return [Array<String>] a list of files
# @return [Array<Array<String, Integer>>] a list of files
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use Array<Array(String, Integer)> to denote ordered tuples. Try it out at https://yardoc.org/types.html

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL! Thanks, fixed 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given X<A, B> means X parameterized by either A or B, how do you annotate X parameterized by both A and B ?

# @see #add_file
attr_reader :files

Expand Down