Progress with params in methods

This commit is contained in:
Devine Lu Linvega
2017-03-22 15:29:37 -07:00
parent 3f17f37458
commit 1bd42e15c8
6 changed files with 36 additions and 24 deletions

View File

@@ -1,16 +1,17 @@
function Method(name,params)
function Method(method_str)
{
Unit.call(this);
this.name = name;
this.params = params;
var content = method_str.split(":");
this.name = content.shift();
this.params = content;
this.example = "";
this.render = function()
{
var s = name+":";
for(param in this.params){
s += this.params[param]+","
s += this.params[param]+":"
}
s = s.substr(0,s.length-1);