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 custom parameter parsing to Slackify #17

Merged
merged 1 commit into from
Sep 5, 2020

Conversation

DougEdey
Copy link
Collaborator

@DougEdey DougEdey commented Sep 4, 2020

This is based on #12 so please just focus on the top commit (it's nice and small)

This allows Slackify to handle parameters that have classes as the type, originally I thought about doing it with a class method (UserParam.parse(value))

But I worried that this would be a bit annoying to people integrating with slackify, so I went with a simple initializer and class attribute intention so that developers can make more custom parsers (such as looking up things externally and returning type errors - not handled yet)

@jusleg
Copy link
Owner

jusleg commented Sep 4, 2020

Oh this is sweet! I'm fine with the changes for the last commit. Once #12 is shipped, we can ship this one.

Copy link
Owner

@jusleg jusleg left a comment

Choose a reason for hiding this comment

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

Very nice! Good to ship once a validator test is added for the unsupported parameter type.

@DougEdey DougEdey merged commit abe59b5 into jusleg:master Sep 5, 2020
@DougEdey DougEdey deleted the custom_params branch September 5, 2020 03:23
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