Comparing version 0.1.15 to 0.1.16
@@ -22,2 +22,3 @@ // Generated by CoffeeScript 1.6.2 | ||
this.fields = parser.parse(this, options.fields); | ||
this.methods = options.methods; | ||
} | ||
@@ -38,3 +39,3 @@ | ||
Schema.prototype.model = function(data) { | ||
var d, m; | ||
var d, m, methodName; | ||
@@ -53,2 +54,5 @@ d = {}; | ||
} | ||
for (methodName in this.methods) { | ||
m[methodName] = this.methods[methodName]; | ||
} | ||
return m; | ||
@@ -55,0 +59,0 @@ }; |
{ | ||
"name": "linen", | ||
"version": "0.1.15", | ||
"version": "0.1.16", | ||
"description": "```javascript", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -44,2 +44,7 @@ var linen = require("..")(), | ||
friends: [{ $ref: "person" }] | ||
}, | ||
methods: { | ||
hello: function(callback) { | ||
callback(null, this.get("name.first")); | ||
} | ||
} | ||
@@ -98,2 +103,9 @@ }), | ||
it("can say hello", function(next) { | ||
personModel.hello(function(err, message) { | ||
expect(message).to.be(personModel.get("name.first")); | ||
next(); | ||
}) | ||
}); | ||
}) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
71611
1679