Sha256: eae3dfc1c19997557f8d0996ff1602fe53bdbf5e23d85b200874ee0b64de8181

Contents?: true

Size: 597 Bytes

Versions: 1

Compression:

Stored size: 597 Bytes

Contents

# frozen_string_literal: true

require "sod"

module Pragmater
  module CLI
    module Commands
      # Removes pragmas.
      class Remove < Sod::Command
        include Dependencies[:settings, :io]

        handle "remove"

        description "Remove pragma comments."

        on Actions::Root
        on Actions::Comment
        on Actions::Pattern

        def initialize(handler: Remover.new, **)
          super(**)
          @handler = handler
        end

        def call = handler.call { |path| io.puts path }

        private

        attr_reader :handler
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pragmater-16.0.0 lib/pragmater/cli/commands/remove.rb