Sha256: f8fb99b156b1a308688edec344b628e7a1a4a0309cbd18faa4d88a22d40a5aee

Contents?: true

Size: 431 Bytes

Versions: 12

Compression:

Stored size: 431 Bytes

Contents

# frozen_string_literal: true

require "sod"

module Pragmater
  module CLI
    module Actions
      # Stores 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

12 entries across 12 versions & 1 rubygems

Version Path
pragmater-14.6.0 lib/pragmater/cli/actions/root.rb
pragmater-14.4.0 lib/pragmater/cli/actions/root.rb
pragmater-14.3.0 lib/pragmater/cli/actions/root.rb
pragmater-14.2.0 lib/pragmater/cli/actions/root.rb
pragmater-14.1.1 lib/pragmater/cli/actions/root.rb
pragmater-14.1.0 lib/pragmater/cli/actions/root.rb
pragmater-14.0.0 lib/pragmater/cli/actions/root.rb
pragmater-13.2.1 lib/pragmater/cli/actions/root.rb
pragmater-13.2.0 lib/pragmater/cli/actions/root.rb
pragmater-13.1.0 lib/pragmater/cli/actions/root.rb
pragmater-13.0.3 lib/pragmater/cli/actions/root.rb
pragmater-13.0.2 lib/pragmater/cli/actions/root.rb