Remove yet another way to register extensions and register/activate FrontMatter like a normal extension.
This commit is contained in:
parent
a6c37f3dd3
commit
abeee38126
4 changed files with 8 additions and 19 deletions
|
@ -62,19 +62,6 @@ module Middleman
|
|||
def configure(env, &block)
|
||||
send("#{env}_config", &block)
|
||||
end
|
||||
|
||||
# Register a new extension
|
||||
#
|
||||
# @param [Module] extension Extension modules to register
|
||||
# @param [Hash] options Per-extension options hash
|
||||
# @return [void]
|
||||
def register(extension, options={}, &block)
|
||||
if extension.ancestors.include?(::Middleman::Extension)
|
||||
extension.new(self, options, &block)
|
||||
else
|
||||
$stderr.puts "!! Tried to register old-style extension: #{extension}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Instance methods
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue