Sha256: 6ad0ecdf4290685e8cba487041a4394a28822174d8ff4bff62ec609c4454bdf0
Contents?: true
Size: 425 Bytes
Versions: 12
Compression:
Stored size: 425 Bytes
Contents
# frozen_string_literal: true module Remocon class IntegerNormalizer < Remocon::Normalizer def self.respond_symbol Remocon::Type::INTEGER end def validate return if @content.class == Integer.class begin @int_val = @content.to_s.to_integer rescue ArgumentError => e raise ValidationError, e.message end end def normalize @int_val end end end
Version data entries
12 entries across 12 versions & 1 rubygems