Sha256: 3a74960d6eb998de1241eb273b82be4048475ce8984126780dd5c1d7304100ed
Contents?: true
Size: 644 Bytes
Versions: 7
Compression:
Stored size: 644 Bytes
Contents
module SoberSwag module Reporting module Input module Converting Integer = (SoberSwag::Reporting::Input.number.format('integer').mapped(&:to_i)) | (SoberSwag::Reporting::Input.text.format('integer').mapped do |v| Integer(v) rescue ArgumentError Report::Value.new(['was not an integer string']) end).described(<<~MARKDOWN).referenced('SoberSwag.Converting.Integer') Integer formatted input. With either convert a JSON number to an integer, or accept a string representation of an integer. MARKDOWN end end end end
Version data entries
7 entries across 7 versions & 1 rubygems