Permalink
Browse files

- `assignRefAdrTo` and `getRefAdrFor` moved to static methods

  • Loading branch information...
1 parent a59d71c commit 94e93fc46a7e256e28c7960d65a9a3477749cbb6 Nickolay Platonov committed Sep 13, 2010
Showing with 13 additions and 11 deletions.
  1. +13 −11 lib/Data/Visitor.js
View
@@ -53,9 +53,7 @@ Class('Data.Visitor', {
assignRefAdrTo : function (object) {
- if (!object.__REFADR__) object.__REFADR__ = this.getRefAdrFor(object)
-
- return object.__REFADR__
+ return this.my.assignRefAdrTo(object)
},
@@ -131,14 +129,6 @@ body : function () {
this.meta.extend({
- methods : {
-
- getRefAdrFor : function (object) {
- return REF++
- }
- },
-
-
my : {
has : {
@@ -152,6 +142,18 @@ body : function () {
var visitor = new this.HOST()
return visitor.visit.apply(visitor, arguments)
+ },
+
+
+ getRefAdrFor : function (object) {
+ return REF++
+ },
+
+
+ assignRefAdrTo : function (object) {
+ if (!object.__REFADR__) object.__REFADR__ = this.getRefAdrFor(object)
+
+ return object.__REFADR__
}
}
}

0 comments on commit 94e93fc

Please sign in to comment.