Sha256: 1e1390a37623c791926c9d8dfdaef96a60837416d675ef3b9df4fec3a5554c21

Contents?: true

Size: 591 Bytes

Versions: 8

Compression:

Stored size: 591 Bytes

Contents

# frozen_string_literal: true

require "sod"

module Pragmater
  module CLI
    module Commands
      # Removes pragmas.
      class Remove < Sod::Command
        include Import[: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

8 entries across 8 versions & 1 rubygems

Version Path
pragmater-15.7.0 lib/pragmater/cli/commands/remove.rb
pragmater-15.6.0 lib/pragmater/cli/commands/remove.rb
pragmater-15.5.0 lib/pragmater/cli/commands/remove.rb
pragmater-15.4.0 lib/pragmater/cli/commands/remove.rb
pragmater-15.3.0 lib/pragmater/cli/commands/remove.rb
pragmater-15.2.0 lib/pragmater/cli/commands/remove.rb
pragmater-15.1.0 lib/pragmater/cli/commands/remove.rb
pragmater-15.0.0 lib/pragmater/cli/commands/remove.rb