diff --git a/src/command/command_builder.rs b/src/command/command_builder.rs new file mode 100644 index 0000000..b7e88be --- /dev/null +++ b/src/command/command_builder.rs @@ -0,0 +1,23 @@ +use super::unix_program::UnixProgram; +use super::Command; + +pub struct CommandBuilder { + argv: Vec, +} + +impl CommandBuilder { + pub fn new() -> Self { + Self { argv: Vec::new() } + } + + pub fn argv(&mut self, argv: Vec) -> &Self { + self.argv = argv; + self + } + + pub fn build(&self) -> impl Command { + let command = UnixProgram::new(&self.argv); + + command + } +}