require 'somemoji' module Middleman module Somemoji class Converter def initialize(body, options) @body = body @provider = options[:provider] @format = options[:format] @emoji_class = options[:emoji_class] @emojis_dir = options[:emojis_dir] end def convert eval("::Somemoji::#{@provider}_emoji_collection").replace_code(@body) do |emoji| %(#{emoji.character}) end end end end end