Skip to content

Commit

Permalink
Updates packages and webpack dev server config
Browse files Browse the repository at this point in the history
  • Loading branch information
chrissrogers committed May 30, 2019
1 parent 6c52ac7 commit 669c37e
Show file tree
Hide file tree
Showing 4 changed files with 216 additions and 150 deletions.
32 changes: 32 additions & 0 deletions lib/recurly/risk/risk-concern.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import ReadinessEmitter from '../../../util/readiness-emitter';
import errors from '../errors';

/**
* Risk concern management class
*/
export default class RiskConcern extends ReadinessEmitter {
constructor ({ risk }) {
this.risk = risk;
this.risk.add(this);
}

get recurly () {
return this.risk.recurly;
}

// To be implemented by individual concerns
attach (container) {}
remove () {}

error (...args) {
const err = errors(...args);
this.emit('error', err);
throw err;
}

destroy () {
this.remove();
this.risk.remove(this);
this.off();
}
}
Loading

0 comments on commit 669c37e

Please sign in to comment.