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

Make more methods private #60

Closed
dentarg opened this issue Oct 30, 2015 · 5 comments
Closed

Make more methods private #60

dentarg opened this issue Oct 30, 2015 · 5 comments

Comments

@dentarg
Copy link
Collaborator

dentarg commented Oct 30, 2015

I tought of this when I saw .to_addressable_uri. I think we want to decrease the number of methods we expose, so we know what we can change without breaking stuff for users.

We can do it like

private_class_method \
def self.foo
end

And if we feel the need to test, there is https://github.com/barelyknown/rspec-context-private

@walro
Copy link
Contributor

walro commented Oct 30, 2015

I tought of this when I saw .to_addressable_uri. I think we want to decrease the number of methods we expose, so we know what we can change without breaking stuff for users.

Hmm yeah, but sometimes you want to test your helper methods, making them private makes that trickier. (Noticed your link, but another dependency and/or abusing :send doesn't feel that clean. There are other nasty things you can do too)

@twingly-mob
Copy link
Member

#58 will make .to_addressable_uri private, but there are more.

We would like to make the following methods private

  • Twingly::URL.internal_parse
  • Twingly::URL.new
  • Twingly::URL#initialize

@dentarg
Copy link
Collaborator Author

dentarg commented Dec 11, 2015

We should also make our constants private

@dentarg
Copy link
Collaborator Author

dentarg commented Dec 11, 2015

dentarg added a commit that referenced this issue Dec 11, 2015
@dentarg dentarg mentioned this issue Dec 11, 2015
2 tasks
dentarg added a commit that referenced this issue Dec 11, 2015
@dentarg
Copy link
Collaborator Author

dentarg commented Jan 20, 2016

Pretty sure there are nothing left to do here and that this should have been closed.

@dentarg dentarg closed this as completed Jan 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants