summaryrefslogtreecommitdiffstats
path: root/lib/models/templateOutput.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-09-05 11:04:18 +0200
committerSamy Pessé <samypesse@gmail.com>2016-09-05 11:04:18 +0200
commita14ca3e268e95a7eab59fb205b41da7331d57631 (patch)
tree9c84b2cbd561345335fca3e26af961b2ea23d8ec /lib/models/templateOutput.js
parent9c071dade573aa6990878006f83c89b6065a1395 (diff)
downloadgitbook-a14ca3e268e95a7eab59fb205b41da7331d57631.zip
gitbook-a14ca3e268e95a7eab59fb205b41da7331d57631.tar.gz
gitbook-a14ca3e268e95a7eab59fb205b41da7331d57631.tar.bz2
Switch to lerna
Diffstat (limited to 'lib/models/templateOutput.js')
-rw-r--r--lib/models/templateOutput.js42
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;