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 helper methods for CodeWriter#openBlock #175

Merged
merged 1 commit into from
Sep 27, 2019
Merged

Conversation

mtdowling
Copy link
Member

The openBlock method now takes a Runnable that is called inside of the
block. The block is then automatically closed when the Runnable
completes. This makes code the uses CodeWriter easier to follow since it
forces indentation and doesn't require the closing "}" to be explicitly
added.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

The openBlock method now takes a Runnable that is called inside of the
block. The block is then automatically closed when the Runnable
completes. This makes code the uses CodeWriter easier to follow since it
forces indentation and doesn't require the closing "}" to be explicitly
added.
@mtdowling mtdowling requested a review from srchase September 27, 2019 20:21
@mtdowling mtdowling merged commit 196e6dc into master Sep 27, 2019
@mtdowling mtdowling deleted the add-open-block-do branch October 15, 2019 20:11
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.

2 participants