# File lib/dm-types/slug.rb, line 23
23: defescape(string)
24: string.to_url
25: end
typecast(value)click to toggle source
# File lib/dm-types/slug.rb, line 13
13: deftypecast(value)
14: ifvalue.nil?
15: nil
16: elsifvalue.respond_to?(:to_str)
17: escape(value.to_str)
18: else
19: raiseArgumentError, '+value+ must be nil or respond to #to_str'
20: end
21: end