Sha256: 696a9687fb30be4bac67dd275ceae9b7faefdd3c9dc878775748864d91f7fe73
Contents?: true
Size: 255 Bytes
Versions: 10
Compression:
Stored size: 255 Bytes
Contents
# frozen_string_literal: true module ValidateParams class Types class Float def self.valid?(value) /\A[-+]?\d+(\.\d+)?\z/ === value.to_s end def self.cast(raw_value, **) raw_value.to_f end end end end
Version data entries
10 entries across 10 versions & 1 rubygems