Skip to content

Instantly share code, notes, and snippets.

@danwrong
Created May 6, 2009 21:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danwrong/107773 to your computer and use it in GitHub Desktop.
Save danwrong/107773 to your computer and use it in GitHub Desktop.
class Datafile
class << self
def glob(val)
@@globs ||= []
@@globs << [glob, self]
end
def find(path)
@@globs.each do |glob, cls|
if glob == path
return cls.new(path)
end
end
end
def initialize(path)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment