Commit 80c3b67a authored by Mark Stenglein's avatar Mark Stenglein

Refactors params to allow for multiple paramaters.

- Needed to be using an array instead of one string.
parent f21cac0c
......@@ -14,12 +14,12 @@ import { isAlpha } from "./util";
*/
export class ContentLine {
private _name: string;
private _param: string[];
private _params: string[] = [];
private _value: string;
constructor(inName: string, inParam: string[], inValue: string) {
constructor(inName: string, inParams: string[], inValue: string) {
this.name = inName;
this.param = inParam;
this._params = inParams;
this.value = inValue;
}
......@@ -29,8 +29,8 @@ export class ContentLine {
return this._name;
}
get param(): string[] {
return this._param;
get params(): string[] {
return this._params;
}
get value(): string {
......@@ -48,10 +48,6 @@ export class ContentLine {
}
}
set param(newParam: string[]) {
this._param = newParam;
}
set value(newValue: string) {
if (isAlpha(newValue)) {
this._value = newValue;
......@@ -77,7 +73,7 @@ export class ContentLine {
public generate(): string {
let outputLine = this.name;
this.param.forEach((param) => {
this.params.forEach((param) => {
outputLine += ';';
outputLine += param;
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment