debian-mirror-gitlab/lib/api/validations/types/comma_separated_to_integer_array.rb

16 lines
293 B
Ruby
Raw Normal View History

2020-07-28 23:09:34 +05:30
# frozen_string_literal: true
module API
module Validations
module Types
class CommaSeparatedToIntegerArray < CommaSeparatedToArray
def self.coerce
lambda do |value|
super.call(value).map(&:to_i)
end
end
end
end
end
end