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

Add extra docs for CSV classes #102

Merged
merged 13 commits into from
Sep 13, 2019
Merged

Add extra docs for CSV classes #102

merged 13 commits into from
Sep 13, 2019

Conversation

vbrazo
Copy link
Contributor

@vbrazo vbrazo commented Aug 18, 2019

Add docs for:

  • lib/csv/fields_converter.rb
  • lib/csv/parser.rb
  • lib/csv/writer.rb

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

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

Thanks!

They are internal classes. So I don't want users to use them directly.

It's acceptable that we have documents for developers but I don't want to add documents for users. Any idea?

@vbrazo
Copy link
Contributor Author

vbrazo commented Aug 18, 2019

@kou that's understandable. I'd suggest adding the responsibilities above the classes/methods and remove any extra detail that could explain how to use the objects. Right now lib/csv/parser.rb is a relatively big class, it doesn't have docs and needs to be improved.

@kou
Copy link
Member

kou commented Aug 19, 2019

OK. Let's do so.

How about adding "Don't use this class directly. This is an internal class." or something too?

@@ -1,8 +1,14 @@
# frozen_string_literal: true

# Note: Don't use this class directly. This is an internal class.
Copy link
Member

Choose a reason for hiding this comment

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

Could you add this line before class FieldsConverter instead of class CSV?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure

@@ -10,11 +10,32 @@
using CSV::DeleteSuffix if CSV.const_defined?(:DeleteSuffix)
using CSV::MatchP if CSV.const_defined?(:MatchP)

# Note: Don't use this class directly. This is an internal class.
Copy link
Member

Choose a reason for hiding this comment

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

Could you do this too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Thanks for the heads up 👍

@@ -5,8 +5,13 @@

using CSV::MatchP if CSV.const_defined?(:MatchP)

# Note: Don't use this class directly. This is an internal class.
Copy link
Member

Choose a reason for hiding this comment

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

Ditto.

@kou kou merged commit 71b072e into ruby:master Sep 13, 2019
@kou
Copy link
Member

kou commented Sep 13, 2019

Thanks!

@vbrazo vbrazo deleted the add-docs-for-objects branch September 13, 2019 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants