Created
March 12, 2009 00:37
-
-
Save julesfern/77840 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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