Created
January 10, 2010 20:18
-
-
Save lancecarlson/273743 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb(main):001:0> class User;include DataMapper::Mongo::Resource;end | |
=> User | |
irb(main):006:0> User.property :id, DataMapper::Mongo::Types::ObjectID | |
=> #<DataMapper::Property @model=User @name=:id> | |
irb(main):003:0> User.property :stuff, DataMapper::Mongo::Types::Array | |
=> #<DataMapper::Property @model=User @name=:stuff> | |
irb(main):004:0> User.class_eval "def foo; puts Array.new;end" | |
=> nil | |
irb(main):007:0> User.new.foo | |
#<DataMapper::Mongo::Types::Array:0xb73383dc> | |
=> nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment