Sha256: 3ce51642a2c3b258ead65d9c73e6928feb0e818965f0f6f636fcd026dacad41f

Contents?: true

Size: 421 Bytes

Versions: 2

Compression:

Stored size: 421 Bytes

Contents

# frozen_string_literal: true

require "sod"

module Tocer
  module CLI
    module Actions
      # Stores table of contents label.
      class Label < Sod::Action
        include Import[:settings]

        description "Set label."

        on %w[-l --label], argument: "[TEXT]"

        default { Container[:settings].label }

        def call(label = nil) = settings.label = label || 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/label.rb
tocer-18.0.0 lib/tocer/cli/actions/label.rb