dashbitco / nimble_options

A tiny library for validating and documenting high-level options. 💽

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Options schema seems to be validated for each call

lud opened this issue · comments

Hello,

What do you think about validating the schema once, so we can define an @attribute and then directly call the validation with a valid schema?

Thank you

This is a great call. Can you please send a PR? We could have something like NimbleOptions.new!, that returns a struct with validated options and if a validated struct is given to NimbleOptions.validate, we don't validate it again.

Agreed, nice idea. Let's do it 👍

Hi @josevalim & @whatyouhide , this is my proposal : #70

Beautiful, closing this in favor of the PR!