Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
lib-ical
Commits
80c3b67a
Commit
80c3b67a
authored
Feb 17, 2017
by
Mark Stenglein
Browse files
Refactors params to allow for multiple paramaters.
- Needed to be using an array instead of one string.
parent
f21cac0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ContentLine.ts
View file @
80c3b67a
...
...
@@ -14,12 +14,12 @@ import { isAlpha } from "./util";
*/
export
class
ContentLine
{
private
_name
:
string
;
private
_param
:
string
[];
private
_param
s
:
string
[]
=
[]
;
private
_value
:
string
;
constructor
(
inName
:
string
,
inParam
:
string
[],
inValue
:
string
)
{
constructor
(
inName
:
string
,
inParam
s
:
string
[],
inValue
:
string
)
{
this
.
name
=
inName
;
this
.
param
=
inParam
;
this
.
_
param
s
=
inParam
s
;
this
.
value
=
inValue
;
}
...
...
@@ -29,8 +29,8 @@ export class ContentLine {
return
this
.
_name
;
}
get
param
():
string
[]
{
return
this
.
_param
;
get
param
s
():
string
[]
{
return
this
.
_param
s
;
}
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
.
param
s
.
forEach
((
param
)
=>
{
outputLine
+=
'
;
'
;
outputLine
+=
param
;
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment