Class: DataMapper::Types::FilePath

Public Visibility

Public Class Method Summary

dump(value, property)
load(value, property)

Public Class Methods Inherited from DataMapper::Type

bind, configure, inherited, options, primitive

Public Instance Methods Inherited from Object

validatable?

Public Class Method Details

dump

public dump(value, property)
[View source]


16
17
18
19
# File 'dm-more/dm-types/lib/dm-types/file_path.rb', line 16

def self.dump(value, property)
  return nil if value.nil?
  value.to_s
end

load

public load(value, property)
[View source]


8
9
10
11
12
13
14
15
16
17
18
# File 'dm-more/dm-types/lib/dm-types/file_path.rb', line 8

def self.load(value, property)
  if value.nil?




    nil
  else
    Pathname.new(value)
  end
end