Skip to content

Instantly share code, notes, and snippets.

@julesfern
Created March 12, 2009 00:37
Show Gist options
  • Save julesfern/77840 to your computer and use it in GitHub Desktop.
Save julesfern/77840 to your computer and use it in GitHub Desktop.
# In Jekyll core...
module Jekyll
module Filters
class CustomFilter
cattr_accessor :extensions
@@extensions = []
def self.extended(base)
@@extensions << base
end
end
end
end
# Definition file...
module Jekyll
module Filters
class MyFilter < CustomFilter
... methods ...
end
end
end
#Later....
Jekyll.something(Jekyll::Filters::CustomFilter.extensions)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment