/** * Run the given callback if and only if, application runs in the given environment. * * <pre> * { * on("dev", "test", "mock", () {@literal ->} { * use(new DevModule()); * }); * } * </pre> * * @param env1 Environment where we want to run the callback. * @param env2 Environment where we want to run the callback. * @param env3 Environment where we want to run the callback. * @param callback An env callback. * @return This jooby instance. */ public Jooby on(final String env1, final String env2, final String env3, final Runnable callback) { on(envpredicate(env1).or(envpredicate(env2)).or(envpredicate(env3)), callback); return this; }
return on(envpredicate(env), callback);
return on(envpredicate(env), callback);
/** * Run the given callback if and only if, application runs in the given environment. * * <pre> * { * on("dev", "test", "mock", () {@literal ->} { * use(new DevModule()); * }); * } * </pre> * * @param env1 Environment where we want to run the callback. * @param env2 Environment where we want to run the callback. * @param env3 Environment where we want to run the callback. * @param callback An env callback. * @return This jooby instance. */ public Jooby on(final String env1, final String env2, final String env3, final Runnable callback) { on(envpredicate(env1).or(envpredicate(env2)).or(envpredicate(env3)), callback); return this; }
return on(envpredicate(env), callback);
return on(envpredicate(env), callback);