module EacRubyUtils::Envs::Command::Concat

Public Instance Methods

concat(operator, other_command) click to toggle source
# File lib/eac_ruby_utils/envs/command/concat.rb, line 9
def concat(operator, other_command)
  duplicate_by_extra_options(concat: ::EacRubyUtils::Struct.new(
    operator: operator, command: other_command
  ))
end
or(other_command) click to toggle source
# File lib/eac_ruby_utils/envs/command/concat.rb, line 15
def or(other_command)
  concat('||', other_command)
end
pipe(other_command) click to toggle source
# File lib/eac_ruby_utils/envs/command/concat.rb, line 19
def pipe(other_command)
  concat('|', other_command)
end

Private Instance Methods

append_concat(command) click to toggle source
# File lib/eac_ruby_utils/envs/command/concat.rb, line 25
def append_concat(command)
  extra_options[:concat].if_present(command) do |v|
    "#{command} #{v.operator} #{v.command.command}"
  end
end