- From: carmen <_@whats-your.name>
- Date: Wed, 11 Mar 2015 20:30:40 +0000
- To: public-rdf-ruby@w3.org
hi.. wondering about this function in various writer-classes: # If base_uri is defined, use it to try to make uri relative # @param [#to_s] uri # @return [String] def relativize(uri) uri = uri.to_s base_uri ? uri.sub(base_uri.to_s, "") : uri end base /2015/03 shortens /2015/03/10 to /10 URI class has a #route_to/#route_from , which would probably be much slower than a naive string-substitution ...
Received on Wednesday, 11 March 2015 20:27:37 UTC