summaryrefslogtreecommitdiff
path: root/lib/chef
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2015-05-15 07:03:27 -0700
committerJay Mundrawala <jdmundrawala@gmail.com>2015-05-15 07:04:23 -0700
commit99fb657932382bfe1b8c78241690d46ab3782c76 (patch)
treef049174d5e7311ba8a87afd03538b48b04200d23 /lib/chef
parentdeb1285c90f85380d949a70aca14df8607b31939 (diff)
downloadchef-99fb657932382bfe1b8c78241690d46ab3782c76.tar.gz
added comment for uri_scheme?
Diffstat (limited to 'lib/chef')
-rw-r--r--lib/chef/mixin/uris.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/chef/mixin/uris.rb b/lib/chef/mixin/uris.rb
index d0ce052ef6..6c1ae793e2 100644
--- a/lib/chef/mixin/uris.rb
+++ b/lib/chef/mixin/uris.rb
@@ -21,6 +21,9 @@ require 'uri'
class Chef
module Mixin
module Uris
+ # uri_scheme? returns true if the string starts with
+ # scheme://
+ # For example, it will match http://foo.bar.com
def uri_scheme?(source)
# From open-uri
!!(%r{\A[A-Za-z][A-Za-z0-9+\-\.]*://} =~ source)