public
Rubygem
Description: DataMapper - Core
Homepage: http://datamapper.org
Clone URL: git://github.com/sam/dm-core.git
Search Repo:
fixed getter for all TrueClass-primitives to #property?, instead of only 
TrueClass-type
somebee (author)
Wed May 14 10:36:19 -0700 2008
commit  7d4ad7c19e4be2e10e039da075dfd9815c6341fc
tree    5081858dc2854a018a49dbc5dd44d05f1b4f1916
parent  3c01f8e8e60ca7c74a146bbef511c24063c49537
...
434
435
436
437
438
439
440
441
442
443
 
 
444
445
446
...
434
435
436
 
437
438
439
440
441
 
442
443
444
445
446
0
@@ -434,13 +434,13 @@
0
       @custom = DataMapper::Type > @type
0
       @options = @custom ? @type.options.merge(options) : options
0
       @instance_variable_name = "@#{@name}"
0
- @getter = TrueClass == @type ? "#{@name}?".to_sym : @name
0
 
0
       # TODO: This default should move to a DataMapper::Types::Text
0
       # Custom-Type and out of Property.
0
       @lazy = @options.fetch(:lazy, @type.respond_to?(:lazy) ? @type.lazy : false)
0
       @primitive = @options.fetch(:primitive, @type.respond_to?(:primitive) ? @type.primitive : @type)
0
-
0
+
0
+ @getter = TrueClass == @primitive ? "#{@name}?".to_sym : @name
0
       @lock = @options.fetch(:lock, false)
0
       @serial = @options.fetch(:serial, false)
0
       @key = @options.fetch(:key, @serial || false)

Comments

    No one has commented yet.