Sha256: 50fe9711a499f7834859962e2cb1707c2facfb9051df65b9b8c5644297fed09c

Contents?: true

Size: 439 Bytes

Versions: 6

Compression:

Stored size: 439 Bytes

Contents

# frozen_string_literal: true

require "sod"

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

        description "Set root directory."

        on %w[-r --root], argument: "[PATH]"

        default { Container[:settings].root_dir }

        def call(path = default) = settings.root_dir = Pathname(path)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

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