Skip to content

[DOC] Enhanced RDoc for ::cp#74

Merged
BurdetteLamar merged 2 commits intoruby:masterfrom
BurdetteLamar:rdoc
May 23, 2022
Merged

[DOC] Enhanced RDoc for ::cp#74
BurdetteLamar merged 2 commits intoruby:masterfrom
BurdetteLamar:rdoc

Conversation

@BurdetteLamar
Copy link
Member

No description provided.

lib/fileutils.rb Outdated
module_function :link_entry

# Copies files from +src+ to +dest+;
# +src+ may not be the path to a directory
Copy link
Contributor

Choose a reason for hiding this comment

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

This second part, describing what src and dest may not be seems weird. I would just drop the second part, and change the semicolon to a period. Near the end of method documentation, state that if +src+ is a directory, an exception is raised. You can completely remove the part about dest not being a path to a file, since that is allowed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

lib/fileutils.rb Outdated
#
# Copies a file content +src+ to +dest+. If +dest+ is a directory,
# copies +src+ to +dest/src+.
# If +src+ is the path to a file and +dest+ does not exist, copies +src+ to +dest+:
Copy link
Contributor

Choose a reason for hiding this comment

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

This is also true if dest is already a file.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

@BurdetteLamar BurdetteLamar requested a review from jeremyevans May 23, 2022 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants