Module: EacRubyUtils::Envs::BaseCommand::Concat
- Defined in:
- lib/eac_ruby_utils/envs/base_command/concat.rb
Constant Summary collapse
- AND_OPERATOR =
'&&'
- BEFORE_OPERATOR =
';'
- OR_OPERATOR =
'||'
- PIPE_OPERATOR =
'|'
Instance Method Summary collapse
- #and(other_command) ⇒ EacRubyUtils::Envs::Command
- #before(other_command) ⇒ EacRubyUtils::Envs::Command
- #concat(operator, other_command) ⇒ EacRubyUtils::Envs::CompositeCommand
- #or(other_command) ⇒ Object
- #pipe(other_command) ⇒ Object
Instance Method Details
#and(other_command) ⇒ EacRubyUtils::Envs::Command
22 23 24 |
# File 'lib/eac_ruby_utils/envs/base_command/concat.rb', line 22 def and(other_command) concat(AND_OPERATOR, other_command) end |
#before(other_command) ⇒ EacRubyUtils::Envs::Command
27 28 29 |
# File 'lib/eac_ruby_utils/envs/base_command/concat.rb', line 27 def before(other_command) concat(BEFORE_OPERATOR, other_command) end |
#concat(operator, other_command) ⇒ EacRubyUtils::Envs::CompositeCommand
16 17 18 19 |
# File 'lib/eac_ruby_utils/envs/base_command/concat.rb', line 16 def concat(operator, other_command) require 'eac_ruby_utils/envs/composite_command' ::EacRubyUtils::Envs::CompositeCommand.new(operator, self, other_command) end |
#or(other_command) ⇒ Object
31 32 33 |
# File 'lib/eac_ruby_utils/envs/base_command/concat.rb', line 31 def or(other_command) concat(OR_OPERATOR, other_command) end |
#pipe(other_command) ⇒ Object
35 36 37 |
# File 'lib/eac_ruby_utils/envs/base_command/concat.rb', line 35 def pipe(other_command) concat(PIPE_OPERATOR, other_command) end |