public
Rubygem
Description: DataMapper - Core
Homepage: http://datamapper.org
Clone URL: git://github.com/sam/dm-core.git
Added Type::bind.
sam (author)
Wed May 07 13:32:27 -0700 2008
commit  8b86e2e9ed0e44af3f4ccf43b1f194f45000af22
tree    f286926ae764be714d9183b7879f2ba64996ee96
parent  5aa6314b6c588b25d19445002655e2cc41538a35
...
439
440
441
 
 
442
443
444
...
439
440
441
442
443
444
445
446
0
@@ -439,6 +439,8 @@ module DataMapper
0
 
0
       @model.auto_generate_validations(self) if @model.respond_to?(:auto_generate_validations)
0
       @model.property_serialization_setup(self) if @model.respond_to?(:property_serialization_setup)
0
+
0
+ @type.bind(self) if @custom
0
     end
0
 
0
     def determine_visibility # :nodoc:
...
149
150
151
 
 
 
 
 
 
152
153
154
...
149
150
151
152
153
154
155
156
157
158
159
160
0
@@ -149,6 +149,12 @@ module DataMapper
0
     def self.load(value, property)
0
       value
0
     end
0
+
0
+ def self.bind(property)
0
+ # This method should not modify the state of this type class, and
0
+ # should produce no side-effects on the type class. It's just a
0
+ # hook to allow your custom-type to modify the property it's bound to.
0
+ end
0
 
0
   end # class Type
0
 

Comments

    No one has commented yet.