Class: MongoMapper::Document::VeneerInterface::Property

Inherits:
Veneer::Base::Property show all
Defined in:
lib/veneer/adapters/mongomapper/property.rb

Instance Attribute Summary

Attributes inherited from Veneer::Base::Property

#parent

Instance Method Summary collapse

Methods inherited from Veneer::Base::Property

#initialize, #validators

Constructor Details

This class inherits a constructor from Veneer::Base::Property

Instance Method Details

#normalize(type) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/veneer/adapters/mongomapper/property.rb', line 5

def normalize(type)
  case type
  when MongoMapper::Extensions::ObjectId then String
  when MongoMapper::Extensions::Boolean then TrueClass
  when MongoMapper::Extensions::Binary then StringIO
  else type
  end
end