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

Document block for Struct.new if present #1099

Merged
merged 1 commit into from
Jun 24, 2017
Merged

Conversation

akihikodaki
Copy link
Contributor

Description

The documentation of Ruby says:

If a block is given it will be evaluated in the context of StructClass, assing the created class as a parameter:
(snip)
This is the recommended way to customize a struct. Subclassing an anonymous struct creates an extra anonymous class that will never be used.

This change implements documentation for such usage.

Completed Tasks

  • I have read the Contributing Guide.
  • The pull request is complete (implemented / written).
  • Git commits have been cleaned up (squash WIP / revert commits).
  • I wrote tests and ran bundle exec rake locally (if code is attached to PR).

The documentation of Ruby says:
> If a block is given it will be evaluated in the context of StructClass,
> assing the created class as a parameter:
> (snip)
> This is the recommended way to customize a struct. Subclassing an
> anonymous struct creates an extra anonymous class that will never be
> used.

This change implements documentation for such usage.
@coveralls
Copy link

coveralls commented Jun 23, 2017

Coverage Status

Coverage increased (+0.01%) to 93.465% when pulling 343b314 on kagucho:master into a85a262 on lsegal:master.

@lsegal lsegal merged commit 1505386 into lsegal:master Jun 24, 2017
@lsegal
Copy link
Owner

lsegal commented Jun 24, 2017

Thanks for the PR!

lsegal added a commit that referenced this pull request Nov 18, 2017
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.

3 participants