Sha256: df86cadc05ae752e78b03dabdf6332dfdb2fb5016d4cf4572c81e57779cc62c4

Contents?: true

Size: 446 Bytes

Versions: 8

Compression:

Stored size: 446 Bytes

Contents

function Player() {
}
Player.prototype.play = function(song) {
  this.currentlyPlayingSong = song;
  this.isPlaying = true;
};

Player.prototype.pause = function() {
  this.isPlaying = false;
};

Player.prototype.resume = function() {
  if (this.isPlaying) {
    throw new Error("song is already playing");
  }

  this.isPlaying = true;
};

Player.prototype.makeFavorite = function() {
  this.currentlyPlayingSong.persistFavoriteStatus(true);
};

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
jasmine-core-3.99.0 ./lib/jasmine-core/example/src/Player.js
jasmine-core-3.10.1 ./lib/jasmine-core/example/src/Player.js
jasmine-core-3.10.0 ./lib/jasmine-core/example/src/Player.js
jasmine-core-3.9.0 ./lib/jasmine-core/example/src/Player.js
jasmine-core-3.8.0 ./lib/jasmine-core/example/src/Player.js
jasmine-core-3.7.1 ./lib/jasmine-core/example/src/Player.js
jasmine-core-3.7.0 ./lib/jasmine-core/example/src/Player.js
jasmine-core-3.6.0 ./lib/jasmine-core/example/src/Player.js