These are chat archives for dry-rb/chat

3rd
Jan 2018
Eugene Khutko
@FoboCasteR
Jan 03 2018 08:57
Hi!
What is the Dry::Types::Definition#try method for?
Gustavo Caso
@GustavoCaso
Jan 03 2018 09:07
I checks if the value provided is the valid
If so returns a Success object with the value
If is not valid it will return Failureobject with the value and the error message
Gustavo Caso
@GustavoCaso
Jan 03 2018 09:12
@FoboCasteR did it help?
Eugene Khutko
@FoboCasteR
Jan 03 2018 09:26
Thanks. I already use it this way. But I not found any docs or code examples.
Eugene Khutko
@FoboCasteR
Jan 03 2018 09:35
Also, it seems to me inconvenient that Result from Dry::Types instead of Dry::Monads
Piotr Solnica
@solnic
Jan 03 2018 09:59
@FoboCasteR we could consider changing it to use Dry::Monads
Gustavo Caso
@GustavoCaso
Jan 03 2018 10:00
I should not be a hard change to make