Sha256: a6a14e0aa43f8eb314856794b004b0797987c75559324367dc0219003ac36b33

Contents?: true

Size: 420 Bytes

Versions: 10

Compression:

Stored size: 420 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[:input]

        description "Set label."

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

        default { Container[:configuration].label }

        def call(label = nil) = input.label = label || 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/label.rb
tocer-17.3.0 lib/tocer/cli/actions/label.rb
tocer-17.2.0 lib/tocer/cli/actions/label.rb
tocer-17.1.0 lib/tocer/cli/actions/label.rb
tocer-17.0.0 lib/tocer/cli/actions/label.rb
tocer-16.2.1 lib/tocer/cli/actions/label.rb
tocer-16.2.0 lib/tocer/cli/actions/label.rb
tocer-16.1.0 lib/tocer/cli/actions/label.rb
tocer-16.0.3 lib/tocer/cli/actions/label.rb
tocer-16.0.2 lib/tocer/cli/actions/label.rb