Parent

DataMapper::Property::FilePath

Public Instance Methods

dump(value) click to toggle source
# File lib/dm-types/file_path.rb, line 22
def dump(value)
  value.to_s unless DataMapper::Ext.blank?(value)
end
load(value) click to toggle source
# File lib/dm-types/file_path.rb, line 18
def load(value)
  Pathname.new(value) unless DataMapper::Ext.blank?(value)
end
primitive?(value) click to toggle source
# File lib/dm-types/file_path.rb, line 10
def primitive?(value)
  value.kind_of?(Pathname)
end
typecast_to_primitive(value) click to toggle source
# File lib/dm-types/file_path.rb, line 26
def typecast_to_primitive(value)
  load(value)
end
valid?(value, negated = false) click to toggle source
# File lib/dm-types/file_path.rb, line 14
def valid?(value, negated = false)
  super || dump(value).kind_of?(::String)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.