Class: String
Instance Method Summary collapse
-
#relative_url? ⇒ Boolean
Returns true iff the receiver seems to be a relative, not a full, URL.
Instance Method Details
#relative_url? ⇒ Boolean
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.
7 8 9 10 |
# File 'lib/dynamic_assets/core_extensions.rb', line 7 def relative_url? regexp = /^[^:\/]*:\/\/[^\/]*/ self[regexp].nil? end |