Permalink
Browse files

Add updateFrom methods to models

  • Loading branch information...
markerikson committed Jan 22, 2017
1 parent d466044 commit df882199efee0fd65f0acb7569cdaa5142c6c2f0
Showing with 12 additions and 0 deletions.
  1. +4 −0 src/features/mechs/Mech.js
  2. +4 −0 src/features/mechs/MechDesign.js
  3. +4 −0 src/features/pilots/Pilot.js
@@ -16,6 +16,10 @@ export default class Mech extends Model {
toJSON() {
return {...this.ref};
}
+
+ updateFrom(otherMech) {
+ this.update(otherMech.ref);
+ }
}
Mech.modelName = "Mech";
@@ -8,6 +8,10 @@ export default class MechDesign extends Model {
toJSON() {
return {...this.ref};
}
+
+ updateFrom(otherDesign) {
+ this.update(otherDesign.ref);
+ }
}
MechDesign.modelName = "MechDesign";
@@ -21,6 +21,10 @@ export default class Pilot extends Model {
toJSON() {
return {...this.ref};
}
+
+ updateFrom(otherPilot) {
+ this.update(otherPilot.ref);
+ }
}
Pilot.modelName = "Pilot";

0 comments on commit df88219

Please sign in to comment.