Skip to content

Instantly share code, notes, and snippets.

@leedo
Created June 7, 2011 01:05
Show Gist options
  • Select an option

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

Select an option

Save leedo/1011468 to your computer and use it in GitHub Desktop.
class Generic
RE = /^http:\/\//
class << self
def valid_url?(url)
url.match(RE)
end
end
end
class Specific < Generic
RE = /^https:\/\//
end
puts Specific.valid_url?("https://")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment