Skip to content

Commit

Permalink
refactor(responsibilty): update initialization
Browse files Browse the repository at this point in the history
Only use the create factory method, now.

#44,#187
  • Loading branch information
gregswindle committed Feb 18, 2018
1 parent 86f503b commit 3964030
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/crc/crc-model.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
const CrcClass = require("./crc-class");
const CrcMeta = require("./crc-meta");
const CrcResponsibility = require("./crc-responsibility");
const {get} = require("lodash");

/**
* Default parameters for a CrcModel NullObject.
*
* @private
* @ignore
*/

const defaultConstructorParams = {
Expand Down Expand Up @@ -61,9 +61,7 @@ class CrcModel {
this.class = params.class;
this.collaborators = params.collaborators;
this.meta = params.meta;
this.responsibilities =
get(CrcResponsibility.create(params.class), "all") || [];
CrcResponsibility.assign(this.class);
this.responsibilities = CrcResponsibility.create(this.class);
}

/**
Expand Down

0 comments on commit 3964030

Please sign in to comment.