Skip to content

Instantly share code, notes, and snippets.

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