Sha256: 95c6974fadb3f819041778738b3f69371e8e8aed1abb9659e778505a757cee93

Contents?: true

Size: 461 Bytes

Versions: 10

Compression:

Stored size: 461 Bytes

Contents

# frozen_string_literal: true

require "sod"

module Tocer
  module CLI
    module Actions
      # Stores table of contents file patterns.
      class Pattern < Sod::Action
        include Import[:input]

        description "Set file patterns."

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

        default { Container[:configuration].patterns }

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
tocer-17.5.0 lib/tocer/cli/actions/pattern.rb
tocer-17.3.0 lib/tocer/cli/actions/pattern.rb
tocer-17.2.0 lib/tocer/cli/actions/pattern.rb
tocer-17.1.0 lib/tocer/cli/actions/pattern.rb
tocer-17.0.0 lib/tocer/cli/actions/pattern.rb
tocer-16.2.1 lib/tocer/cli/actions/pattern.rb
tocer-16.2.0 lib/tocer/cli/actions/pattern.rb
tocer-16.1.0 lib/tocer/cli/actions/pattern.rb
tocer-16.0.3 lib/tocer/cli/actions/pattern.rb
tocer-16.0.2 lib/tocer/cli/actions/pattern.rb