Sha256: 24c3fd284219846296eefb54716b53ad1615610dd55b6b1c937e3ba02bfc3e54
Contents?: true
Size: 1.05 KB
Versions: 8
Compression:
Stored size: 1.05 KB
Contents
# frozen_string_literal: true module ConvenientService module Examples module Standard module RequestParams module Services class CastParams include ConvenientService::Standard::Config attr_reader :params def initialize(params:) @params = params end def result success(original_params: params, casted_params: casted_params) end private def casted_params { id: Entities::ID.cast(params[:id]), format: Entities::Format.cast(params[:format]), title: Entities::Title.cast(params[:title]), description: Entities::Description.cast(params[:description]), tags: Utils::Array.wrap(params[:tags]).map { |tag| Entities::Tag.cast(tag) }, sources: Utils::Array.wrap(params[:sources]).map { |source| Entities::Source.cast(source) } } end end end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems