Sha256: 4287909f50f9073a12914cc241bea493cc1e9e44deb5fd6a3027c2d9a131d263

Contents?: true

Size: 414 Bytes

Versions: 6

Compression:

Stored size: 414 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 = default) = settings.label = label
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tocer-18.7.0 lib/tocer/cli/actions/label.rb
tocer-18.6.0 lib/tocer/cli/actions/label.rb
tocer-18.5.0 lib/tocer/cli/actions/label.rb
tocer-18.4.0 lib/tocer/cli/actions/label.rb
tocer-18.3.0 lib/tocer/cli/actions/label.rb
tocer-18.2.0 lib/tocer/cli/actions/label.rb