Skip to content

Instantly share code, notes, and snippets.

@leedo
Created June 7, 2011 00:34
Show Gist options
  • Select an option

  • Save leedo/1011439 to your computer and use it in GitHub Desktop.

Select an option

Save leedo/1011439 to your computer and use it in GitHub Desktop.
class Generic
class << self
def pattern
/^https?:\/\/.*/i
end
def valid_url? (url)
url.match(pattern)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment