Sha256: 63238eb4e71dca4062584bedb299624bceadd108241c9832beffa35c71c4439f

Contents?: true

Size: 448 Bytes

Versions: 2

Compression:

Stored size: 448 Bytes

Contents

# frozen_string_literal: true

require "sod"

module Pragmater
  module CLI
    module Actions
      # Stores file patterns.
      class Pattern < Sod::Action
        include Import[:settings]

        description "Set file patterns."

        on %w[-p --patterns], argument: "[a,b,c]"

        default { Container[:settings].patterns }

        def call(patterns = nil) = settings.patterns = Array(patterns || default)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pragmater-15.1.0 lib/pragmater/cli/actions/pattern.rb
pragmater-15.0.0 lib/pragmater/cli/actions/pattern.rb