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

Custom type parsing #1

Closed
ozydingo opened this issue Oct 11, 2017 · 2 comments
Closed

Custom type parsing #1

ozydingo opened this issue Oct 11, 2017 · 2 comments
Assignees

Comments

@ozydingo
Copy link
Owner

Suggested call signature:

datetime :create_after, ->(val){Chronic.parse(val)}, **opts
@ozydingo
Copy link
Owner Author

We can call some validations around the Proc's call -- can we / should we / how do we validate that the proc returned a reasonable value? Can we make it easy for this use case to specify error conditions / handling / messages?

@ozydingo
Copy link
Owner Author

Released 0.3.0 using syntax:

datetime :create_after do |name, val, opts|
  Chronic.parse(val)
end

@ozydingo ozydingo self-assigned this Mar 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant