Class: DataMapper::Property::FilePath
- Inherits:
-
String
- Object
- String
- DataMapper::Property::FilePath
- Defined in:
- lib/dm-types/file_path.rb
Instance Method Summary collapse
Instance Method Details
#dump(value) ⇒ Object
15 16 17 |
# File 'lib/dm-types/file_path.rb', line 15 def dump(value) value.to_s unless DataMapper::Ext.blank?(value) end |
#load(value) ⇒ Object
11 12 13 |
# File 'lib/dm-types/file_path.rb', line 11 def load(value) Pathname.new(value) unless DataMapper::Ext.blank?(value) end |
#typecast(value) ⇒ Object
19 20 21 |
# File 'lib/dm-types/file_path.rb', line 19 def typecast(value) load(value) end |