Sha256: 8f806bde1ee9a45dead8e8915484e49e9681b44c01be5e136b2e1a97b83605aa

Contents?: true

Size: 510 Bytes

Versions: 1

Compression:

Stored size: 510 Bytes

Contents

# frozen_string_literal: true

require "refinements/structs"
require "sod"

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

        using Refinements::Structs

        description "Set root directory."

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

        default { Container[:configuration].root_dir }

        def call(path = default) = input.merge! root_dir: Pathname(path)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tocer-16.0.1 lib/tocer/cli/actions/root.rb