Sha256: d35340ba0c9e2e5492dc65df3442c5d7f7a1768ee20aad4ac4ba70abbf272929

Contents?: true

Size: 513 Bytes

Versions: 72

Compression:

Stored size: 513 Bytes

Contents

# frozen_string_literal: true

require 'active_support/core_ext/hash/indifferent_access'
require 'active_support/core_ext/object/blank'
require 'shellwords'

module EacRubyUtils
  module Envs
    class Command
      module ExtraOptions
        def chdir(dir)
          duplicate_by_extra_options(chdir: dir)
        end

        private

        def append_chdir(command)
          extra_options[:chdir].present? ? "(cd '#{extra_options[:chdir]}' ; #{command} )" : command
        end
      end
    end
  end
end

Version data entries

72 entries across 72 versions & 2 rubygems

Version Path
eac_ruby_utils-0.123.0 lib/eac_ruby_utils/envs/command/extra_options.rb
eac_ruby_utils-0.121.0 lib/eac_ruby_utils/envs/command/extra_options.rb
eac_ruby_utils-0.120.0 lib/eac_ruby_utils/envs/command/extra_options.rb
eac_tools-0.76.1 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/extra_options.rb
eac_tools-0.76.0 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/extra_options.rb
eac_tools-0.75.2 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/extra_options.rb
eac_ruby_utils-0.119.2 lib/eac_ruby_utils/envs/command/extra_options.rb
eac_tools-0.75.1 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/extra_options.rb
eac_tools-0.75.0 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/extra_options.rb
eac_ruby_utils-0.119.1 lib/eac_ruby_utils/envs/command/extra_options.rb
eac_tools-0.74.1 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/extra_options.rb
eac_tools-0.74.0 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/extra_options.rb
eac_tools-0.73.0 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/extra_options.rb
eac_ruby_utils-0.119.0 lib/eac_ruby_utils/envs/command/extra_options.rb
eac_tools-0.72.0 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/extra_options.rb
eac_ruby_utils-0.118.1 lib/eac_ruby_utils/envs/command/extra_options.rb
eac_ruby_utils-0.118.0 lib/eac_ruby_utils/envs/command/extra_options.rb
eac_tools-0.70.1 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/extra_options.rb
eac_tools-0.70.0 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/extra_options.rb
eac_tools-0.69.1 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/extra_options.rb