Sha256: 8a412afbc1150311fa0224ddc7a2ff79bf84403abde992dfe67df49a7fff22ce

Contents?: true

Size: 462 Bytes

Versions: 2

Compression:

Stored size: 462 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[: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
tocer-18.1.0 lib/tocer/cli/actions/pattern.rb
tocer-18.0.0 lib/tocer/cli/actions/pattern.rb