Sha256: a89899673eac2794350a3749eec8b0bb858f3840db8ab67d38a9a5e23da8be8e
Contents?: true
Size: 741 Bytes
Versions: 4
Compression:
Stored size: 741 Bytes
Contents
# frozen_string_literal: true module ConvenientService module Examples module Dry module V1 class 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 end
Version data entries
4 entries across 4 versions & 1 rubygems