Sha256: b478ceb87077080e690946a01f27db2826796362ec5cbe7dcbb2581b74dcb1e9
Contents?: true
Size: 858 Bytes
Versions: 7
Compression:
Stored size: 858 Bytes
Contents
# frozen_string_literal: true require "pragmater" require "refinements/pathname" module Rubysmith module Extensions # Ensures project skeleton has pragmas. class Pragmater using Refinements::Pathname def self.call(...) = new(...).call def self.custom_configuration ::Pragmater::Configuration::Model[ comments: ["# frozen_string_literal: true"], patterns: %w[**/*.rake **/*.rb *.gemspec exe/* bin/* config.ru *file] ] end def initialize configuration, client: ::Pragmater::Inserter.new @configuration = configuration @client = client end def call configuration.project_root.change_dir { client.call self.class.custom_configuration } configuration end private attr_reader :configuration, :client end end end
Version data entries
7 entries across 7 versions & 1 rubygems