2014-05-23 18:14:06 +00:00
|
|
|
var defaults = require('../constants.js').ENVIRONMENT;
|
2014-02-19 22:29:11 +00:00
|
|
|
|
2014-05-23 18:14:06 +00:00
|
|
|
module.exports = function Environment(env) {
|
|
|
|
env = env || {};
|
|
|
|
env.TMP = env.TMP || defaults.TMP;
|
|
|
|
env.PATH = env.PATH || defaults.PATH;
|
2014-02-19 22:29:11 +00:00
|
|
|
|
2014-05-23 18:14:06 +00:00
|
|
|
this.get = function(name) {
|
|
|
|
return env[name];
|
|
|
|
};
|
2014-02-19 22:29:11 +00:00
|
|
|
|
2014-05-23 18:14:06 +00:00
|
|
|
this.set = function(name, value) {
|
|
|
|
env[name] = value;
|
|
|
|
};
|
|
|
|
};
|