First, thanks for maintaining this gem, I love it! 🎉
I like that we can do things like string :name, strip: true which transforms the input by stripping it.
I think it would be useful to be able to define an arbitrary transformation lambda when the input is defined.
For example, this would snap all time inputs to the beginning of the day, and force variable names into the proper format:
time :start, transform: -> (t) { t.beginning_of_day }
string :var, transform: -> (s) { s.camelcase }
This would certainly DRY up a lot of our code.
First, thanks for maintaining this gem, I love it! 🎉
I like that we can do things like
string :name, strip: truewhich transforms the input by stripping it.I think it would be useful to be able to define an arbitrary transformation lambda when the input is defined.
For example, this would snap all time inputs to the beginning of the day, and force variable names into the proper format:
This would certainly DRY up a lot of our code.