These are chat archives for dry-rb/chat

7th
Jun 2018
Nikita Shilnikov
@flash-gordon
Jun 07 2018 12:01
Hey folks, dry-system 0.10.0 is out, no major changes, mostly a compatibility release with dry-struct 0.5.0. We also improved integration with dry-inflector. As always, checkout the changelog https://github.com/dry-rb/dry-system/blob/master/CHANGELOG.md#0100---2018-06-07
Guilherme Moreira
@gmmoreira
Jun 07 2018 13:40
@firstsano maybe you can use a custom validation block? http://dry-rb.org/gems/dry-validation/custom-validation-blocks/ . You give a name to that validation and which attributes do you want to use in that block. If not maybe you can give an example.
ojab
@ojab
Jun 07 2018 16:35
Dry::Types['coercible.float'].constrained(lteq: ::Float::MAX)[::Float::MAX.to_i + 100] # => 1.7976931348623157e+308
why so?
coercion int -> float & it equals Float::MAX?
ojab
@ojab
Jun 07 2018 16:43
(yeah, I'm too lazy to read the code ._.)