[Clocks/Timers] renaming of Abstract class

renaming AbstractStartTimerAction to AbstractTime
This commit is contained in:
DJ 2017-01-14 16:41:54 -06:00
parent d94e8b10d8
commit 7fc66e2de8
4 changed files with 14 additions and 14 deletions

View File

@ -40,12 +40,12 @@ define(
* time (typically wrapping `Date.now`)
* @param {ActionContext} context the context for this action
*/
function AbstractStartTimerAction(now, context) {
function AbstractTimerAction(now, context) {
this.domainObject = context.domainObject;
this.now = now;
}
AbstractStartTimerAction.prototype.perform = function () {
AbstractTimerAction.prototype.perform = function () {
var domainObject = this.domainObject,
now = this.now;
@ -56,6 +56,6 @@ define(
return domainObject.useCapability('mutation', setTimestamp);
};
return AbstractStartTimerAction;
return AbstractTimerAction;
}
);

View File

@ -21,8 +21,8 @@
*****************************************************************************/
define(
['./AbstractStartTimerAction'],
function (AbstractStartTimerAction) {
['./AbstractTimerAction'],
function (AbstractTimerAction) {
/**
* Implements the "Restart at 0" action.
@ -39,11 +39,11 @@ define(
* @param {ActionContext} context the context for this action
*/
function RestartTimerAction(now, context) {
AbstractStartTimerAction.apply(this, [now, context]);
AbstractTimerAction.apply(this, [now, context]);
}
RestartTimerAction.prototype =
Object.create(AbstractStartTimerAction.prototype);
Object.create(AbstractTimerAction.prototype);
RestartTimerAction.appliesTo = function (context) {
var model =

View File

@ -21,8 +21,8 @@
*****************************************************************************/
define(
['./AbstractStartTimerAction'],
function (AbstractStartTimerAction) {
['./AbstractTimerAction'],
function (AbstractTimerAction) {
/**
* Implements the "Start" action for timers.
@ -39,11 +39,11 @@ define(
* @param {ActionContext} context the context for this action
*/
function StartTimerAction(now, context) {
AbstractStartTimerAction.apply(this, [now, context]);
AbstractTimerAction.apply(this, [now, context]);
}
StartTimerAction.prototype =
Object.create(AbstractStartTimerAction.prototype);
Object.create(AbstractTimerAction.prototype);
StartTimerAction.appliesTo = function (context) {
var model =

View File

@ -21,8 +21,8 @@
*****************************************************************************/
define(
["../../src/actions/AbstractStartTimerAction"],
function (AbstractStartTimerAction) {
["../../src/actions/AbstractTimerAction"],
function (AbstractTimerAction) {
describe("A timer's start/restart action", function () {
var mockNow,
@ -54,7 +54,7 @@ define(
testModel = {};
action = new AbstractStartTimerAction(mockNow, {
action = new AbstractTimerAction(mockNow, {
domainObject: mockDomainObject
});
});