Sha256: be0cdb5f11b7845c80576b9b1eeb467963680ea787a0bc06170ec5ba0d9ee564

Contents?: true

Size: 445 Bytes

Versions: 10

Compression:

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

        description "Set root directory."

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

        default { Container[:configuration].root_dir }

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