Parent

Methods

DataMapper::Property::Slug

Public Instance Methods

escape(string) click to toggle source
# File lib/dm-types/slug.rb, line 23
def escape(string)
  string.to_url
end
typecast(value) click to toggle source
# File lib/dm-types/slug.rb, line 13
def typecast(value)
  if value.nil?
    nil
  elsif value.respond_to?(:to_str)
    escape(value.to_str)
  else
    raise ArgumentError, '+value+ must be nil or respond to #to_str'
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.