Sha256: 5ccb705ce0c4d7a0368c1c95df85b2e3f4774af7f0755a3986e8288247fa5d15
Contents?: true
Size: 678 Bytes
Versions: 13
Compression:
Stored size: 678 Bytes
Contents
# frozen_string_literal: true module ConvenientService module Examples module Dry module Gemfile module Services class ReadFileContent include DryService::Config option :path contract do schema do required(:path).filled(:string) end end step Services::AssertFileExists, in: :path step Services::AssertFileNotEmpty, in: :path step :result, in: :path, out: :content def result success(data: {content: ::File.read(path)}) end end end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems