Sha256: c9170757bd90598acdfb848521e095d194c3e2784b44250fa65e2d0669435bd9

Contents?: true

Size: 425 Bytes

Versions: 6

Compression:

Stored size: 425 Bytes

Contents

# frozen_string_literal: true

require "sod"

module Pragmater
  module CLI
    module Actions
      # Stores 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
pragmater-15.7.0 lib/pragmater/cli/actions/root.rb
pragmater-15.6.0 lib/pragmater/cli/actions/root.rb
pragmater-15.5.0 lib/pragmater/cli/actions/root.rb
pragmater-15.4.0 lib/pragmater/cli/actions/root.rb
pragmater-15.3.0 lib/pragmater/cli/actions/root.rb
pragmater-15.2.0 lib/pragmater/cli/actions/root.rb