com.bertramlabs.plugins.jruby.JrubyContainerConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jruby-container Show documentation
Show all versions of jruby-container Show documentation
Provides an isolated Jruby Execution Container that can fetch gems to run from rubygems in an isolated folder.
The newest version!
/*
* Copyright 2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.bertramlabs.plugins.jruby;
import java.util.Map;
/**
* A Container used for storing a static map of config options
* @author David Estes
*/
public class JrubyContainerConfig {
static Map config;
/**
* Grab the containerPath which defaults to '.jruby-container' or can be specified directly in the config Map with the key 'containerPath'
*/
public static String getContainerPath() {
if(config == null) {
return ".jruby-container";
}
String configPath = (String)(JrubyContainerConfig.getConfig().get("containerPath"));
if(configPath == null) {
return ".jruby-container";
} else {
return configPath;
}
}
/**
* Returns the Config Map
* @return Configuration Map
*/
public static Map getConfig() {
return config;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy