Sha256: 80fe2aa5100b252b874944814e1c56c4af0abd070d3fa546782b79dd63443358
Contents?: true
Size: 935 Bytes
Versions: 17
Compression:
Stored size: 935 Bytes
Contents
# frozen_string_literal: true require "pathname" require "pragmater" module Gemsmith module Generators # Formats pragma comments in source files. class Pragma < Base def self.comments ["# frozen_string_literal: true"] end # rubocop:disable Metrics/MethodLength def includes %W[ **/*Gemfile **/*Guardfile **/*Rakefile **/*config.ru **/*bin/#{configuration.dig :gem, :name} **/*bin/bundle **/*bin/rails **/*bin/rake **/*bin/setup **/*bin/update **/*bin/yarn **/*.gemspec **/*.rake **/*.rb ] end # rubocop:enable Metrics/MethodLength def run Pragmater::Runner.new( gem_root, comments: self.class.comments, includes: includes ).run action: :add end end end end
Version data entries
17 entries across 17 versions & 1 rubygems