mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
34 lines
630 B
JavaScript
34 lines
630 B
JavaScript
'use strict';
|
|
|
|
const SError = require('./Error'),
|
|
SerializerFileSystem = require('./SerializerFileSystem'),
|
|
fs = require('fs'),
|
|
_ = require('lodash'),
|
|
BbPromise = require('bluebird');
|
|
|
|
let SUtils;
|
|
|
|
class Variables extends SerializerFileSystem {
|
|
|
|
constructor(S, data) {
|
|
super(S);
|
|
|
|
SUtils = S.utils;
|
|
|
|
this._S = S;
|
|
this._class = 'Variables';
|
|
|
|
if (data) this.fromObject(data);
|
|
}
|
|
|
|
toObject() {
|
|
return SUtils.exportObject(_.cloneDeep(this));
|
|
}
|
|
|
|
fromObject(data) {
|
|
return _.merge(this, data);
|
|
}
|
|
}
|
|
|
|
module.exports = Variables;
|