class String
Public Instance Methods
relative_url?()
click to toggle source
Returns true iff the receiver seems to be a relative, not a full, URL. By “relative url” we mean a URL with no host info, although it may begin with a slash.
# File lib/dynamic_assets/core_extensions.rb, line 7 def relative_url? regexp = /^[^:\/]*:\/\/[^\/]*/ self[regexp].nil? end