Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
jio
Commits
abe7251f
Commit
abe7251f
authored
Dec 21, 2012
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding some docstring to command.js
parent
429f5f41
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
2 deletions
+26
-2
src/jio/commands/command.js
src/jio/commands/command.js
+26
-2
No files found.
src/jio/commands/command.js
View file @
abe7251f
...
@@ -58,15 +58,28 @@ var command = function(spec, my) {
...
@@ -58,15 +58,28 @@ var command = function(spec, my) {
return
'
command
'
;
return
'
command
'
;
};
};
/**
* Gets the document id
* @method getDocId
* @return {string} The document id
*/
that
.
getDocId
=
function
()
{
that
.
getDocId
=
function
()
{
return
priv
.
docid
.
split
(
'
/
'
)[
0
];
return
priv
.
docid
.
split
(
'
/
'
)[
0
];
};
};
/**
* Gets the attachment id
* @method getAttachmentId
* @return {string} The attachment id
*/
that
.
getAttachmentId
=
function
()
{
that
.
getAttachmentId
=
function
()
{
return
priv
.
docid
.
split
(
'
/
'
)[
1
];
return
priv
.
docid
.
split
(
'
/
'
)[
1
];
};
};
/**
/**
* @method getDoc returns the label of the command.
* Returns the label of the command.
* @return {object} the document.
* @method getDoc
* @return {object} The document.
*/
*/
that
.
getDoc
=
function
()
{
that
.
getDoc
=
function
()
{
return
priv
.
doc
;
return
priv
.
doc
;
...
@@ -119,11 +132,22 @@ var command = function(spec, my) {
...
@@ -119,11 +132,22 @@ var command = function(spec, my) {
return
true
;
return
true
;
};
};
/**
* Check if the command can be retried.
* @method canBeRetried
* @return {boolean} The result
*/
that
.
canBeRetried
=
function
()
{
that
.
canBeRetried
=
function
()
{
return
(
typeof
priv
.
option
.
max_retry
===
'
undefined
'
||
return
(
typeof
priv
.
option
.
max_retry
===
'
undefined
'
||
priv
.
option
.
max_retry
===
0
||
priv
.
option
.
max_retry
===
0
||
priv
.
tried
<
priv
.
option
.
max_retry
);
priv
.
tried
<
priv
.
option
.
max_retry
);
};
};
/**
* Gets the number time the command has been tried.
* @method getTried
* @return {number} The number of time the command has been tried
*/
that
.
getTried
=
function
()
{
that
.
getTried
=
function
()
{
return
priv
.
tried
;
return
priv
.
tried
;
};
};
...
...
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