Update docs to recommend upfront module definition (i.e. Types = Dry.Types())#432
Open
Update docs to recommend upfront module definition (i.e. Types = Dry.Types())#432
Types = Dry.Types())#432Conversation
Member
Author
|
@solnic @flash-gordon — are you happy with this? If so, I'll merge this and actually make sure we have a 1.5 version of the docs published at dry-rb.org. |
radar
reviewed
Jan 4, 2022
Despite it being (somewhat unconventionally) downcased, this is proper noun and not a piece of code, so we shouldn't show it as such.
adam12
reviewed
Jan 4, 2022
| ### Categories | ||
|
|
||
| Assuming you included `Dry::Types` ([see instructions](docs::getting-started)) in a module called `Types`: | ||
| Assuming you've defined your own `Types` module ([see instructions](docs::getting-started)): |
There was a problem hiding this comment.
How do you feel about changing the assertion to one that would be more indicative that they should do this, rather than conditional that they might have.
Suggested change
| Assuming you've defined your own `Types` module ([see instructions](docs::getting-started)): | |
| After you've defined your own `Types` module ([see instructions](docs::getting-started)): |
flash-gordon
approved these changes
Jan 4, 2022
solnic
approved these changes
Jan 4, 2022
Contributor
|
@timriley I just stumbled upon this. Should we make this change to Hanakai docs instead? |
Member
Author
|
@katafrakt yes, let's! |
Contributor
|
Ok, I'll do that |
timriley
pushed a commit
to hanakai-rb/site
that referenced
this pull request
Feb 20, 2026
…Types()) (#258) Ports dry-rb/dry-types#432 (with additional name changes we agreed on, i.e. generally writing "Dry Types", not "dry-types").
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As agreed, this is our recommendation to resolve the issue raised in #422.
Most of our code examples depend on a
::Typesmodule having been already created, so to make sure those examples are as clear as possible, I've also addedTypes = Dry.Types()in front of any grouping of code examples.Made a few other very minor adjustments along the way, too.
Resolves #422