org.snapscript.common.command.CommandOperation Maven / Gradle / Ivy
package org.snapscript.common.command;
import java.util.concurrent.Callable;
public class CommandOperation implements Callable {
private final Environment environment;
private final Command command;
public CommandOperation(Command command, Environment environment) {
this.environment = environment;
this.command = command;
}
@Override
public Console call() throws Exception {
return command.execute(environment);
}
}