Class: DataMapper::Types::Json
- Inherits:
-
DataMapper::Type
- Object
- DataMapper::Type
- DataMapper::Types::Json
- Defined in:
- lib/gems/dm-types-0.9.9/lib/dm-types/json.rb
Constant Summary
Constants inherited from DataMapper::Type
DataMapper::Type::PROPERTY_OPTIONS, DataMapper::Type::PROPERTY_OPTION_ALIASES
Class Method Summary collapse
Methods inherited from DataMapper::Type
bind, configure, inherited, options, primitive
Class Method Details
.dump(value, property) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/gems/dm-types-0.9.9/lib/dm-types/json.rb', line 20 def self.dump(value, property) if value.nil? || value.is_a?(String) value else ::JSON.dump(value) end end |