Sha256: d1e7d7508987a44cb4768d098f53846f54f6508dc4e9960652360cb275e750f9
Contents?: true
Size: 1.21 KB
Versions: 15
Compression:
Stored size: 1.21 KB
Contents
# frozen_string_literal: true ## # Usage example: # # result = ConvenientService::Examples::Dry::Gemfile::Services::Format.result(path: "Gemfile") # result = ConvenientService::Examples::Dry::Gemfile::Services::Format.result(path: "spec/cli/gemfile/format/fixtures/Gemfile") # module ConvenientService module Examples module Dry module Gemfile module Services class Format include DryService::Config option :path step Services::ReadFileContent, in: :path, out: :content step Services::StripComments, in: :content, out: :content_without_comments step Services::ParseContent, in: {content: :content_without_comments}, out: :parsed_content step Services::FormatHeader, in: :parsed_content, out: {formatted_content: :formatted_header_content} step Services::FormatBody, in: :parsed_content, out: {formatted_content: :formatted_body_content} before :result do @progressbar = ::ProgressBar.create(title: "Formatting", total: steps.count) end after :step do |step_result| @progressbar.increment end end end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems