ronin/sources/scripts/module.js
2017-09-26 15:36:15 +13:00

25 lines
529 B
JavaScript

function Module(name)
{
this.name = name;
this.methods = {};
this.settings = {};
this.routes = {};
this.ports = {};
this.hint = function()
{
var html = "";
for(setting_id in this.settings){
var setting_value = this.settings[setting_id];
html += setting_id+"="+setting_value+" ";
}
for(route_id in this.routes){
var route_val = this.routes[route_id];
html += route_val+"->"+route_id+" ";
}
return html.trim() != "" ? "<b>"+this.name+"</b> "+html.trim() : "";
}
}