Class: Middleman::Emojifire::Extension

Inherits:
Middleman::Extension
  • Object
show all
Defined in:
lib/middleman-emojifire/extension.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, options_hash = {}, &block) ⇒ Extension

Returns a new instance of Extension.



7
8
9
10
11
12
13
14
# File 'lib/middleman-emojifire/extension.rb', line 7

def initialize(app, options_hash={}, &block)
  super
  require "gemoji"

  app.after_render do |content|
    ::Middleman::Emojifire::Converter.new(content).convert
  end
end