class DataMapper::Property::URI
Public Instance Methods
custom?()
click to toggle source
# File lib/dm-types/uri.rb, line 12 def custom? true end
dump(value)
click to toggle source
# File lib/dm-types/uri.rb, line 28 def dump(value) value.to_s unless value.nil? end
load(value)
click to toggle source
# File lib/dm-types/uri.rb, line 24 def load(value) Addressable::URI.parse(value) end
primitive?(value)
click to toggle source
# File lib/dm-types/uri.rb, line 16 def primitive?(value) value.kind_of?(Addressable::URI) end
typecast_to_primitive(value)
click to toggle source
# File lib/dm-types/uri.rb, line 32 def typecast_to_primitive(value) load(value) end
valid?(value, negated = false)
click to toggle source
Calls superclass method
# File lib/dm-types/uri.rb, line 20 def valid?(value, negated = false) super || primitive?(value) || value.kind_of?(::String) end