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

Added Submission::link and Comment::comment_link #82

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

khalilfazal
Copy link

The method names are confusing.
Why does Submission::permalink return a relative path instead of an absolute path?
Why does Comment::link return the link to the submission instead of a link to the comment itself?

the method names are confusing. Why does Comment::link return the link to the submission instead?
Added Comment::comment_link
def link
"https://www.reddit.com#{permalink}"
end

Choose a reason for hiding this comment

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

Layout/TrailingWhitespace: Trailing whitespace detected.

def comment_link
link.link + id
end

Choose a reason for hiding this comment

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

Layout/TrailingWhitespace: Trailing whitespace detected.

removed whitespace
removed whitespace
@khalilfazal
Copy link
Author

So I don't think it's my fault that travis can't build. It is having trouble installing jruby.

@StephanMeijer
Copy link

Reddit calls a submission also a link. Please suffix your functions with _url instead of _link.

Suggestion from Stephan Meijer:

Reddit calls a submission also a link. Please suffix your functions with _url instead of _link.
@StephanMeijer
Copy link

Maybe change to other link-function to url as well?

@StephanMeijer
Copy link

Thank you. I will merge it into my fork (https://github.com/StephanMeijer/redd/)

Repository owner deleted a comment from katsavav Feb 5, 2024
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.

4 participants