diff options
Diffstat (limited to 'lib/models/templateOutput.js')
-rw-r--r-- | lib/models/templateOutput.js | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/lib/models/templateOutput.js b/lib/models/templateOutput.js deleted file mode 100644 index ae63c06..0000000 --- a/lib/models/templateOutput.js +++ /dev/null @@ -1,42 +0,0 @@ -var Immutable = require('immutable'); - -var TemplateOutput = Immutable.Record({ - // Text content of the template - content: String(), - - // Map of blocks to replace / post process - blocks: Immutable.Map() -}, 'TemplateOutput'); - -TemplateOutput.prototype.getContent = function() { - return this.get('content'); -}; - -TemplateOutput.prototype.getBlocks = function() { - return this.get('blocks'); -}; - -/** - * Update content of this output - * @param {String} content - * @return {TemplateContent} - */ -TemplateOutput.prototype.setContent = function(content) { - return this.set('content', content); -}; - -/** - * Create a TemplateOutput from a text content - * and an object containing block definition - * @param {String} content - * @param {Object} blocks - * @return {TemplateOutput} - */ -TemplateOutput.create = function(content, blocks) { - return new TemplateOutput({ - content: content, - blocks: Immutable.fromJS(blocks) - }); -}; - -module.exports = TemplateOutput; |