Sha256: c33caca1f78727bd103a0a6bd7b3f4ac8c5428e0b9c1116c08284dfb2563387a
Contents?: true
Size: 321 Bytes
Versions: 7
Compression:
Stored size: 321 Bytes
Contents
# frozen_string_literal: true # @api public # @since 0.1.0 SmartCore::Types::Value.define_type(:Integer) do |type| type.define_checker do |value| value.is_a?(::Integer) end type.define_caster do |value| begin Integer(value) rescue ::TypeError, ::ArgumentError value.to_i end end end
Version data entries
7 entries across 7 versions & 1 rubygems