Sha256: 2b41683981001d6df963c26754d31f9c0ce401829bc0cb8e38acb8815a731a61
Contents?: true
Size: 636 Bytes
Versions: 12
Compression:
Stored size: 636 Bytes
Contents
require "github/markup/implementation" module GitHub module Markup class GemImplementation < Implementation attr_reader :gem_name, :renderer def initialize(regexp, languages, gem_name, &renderer) super(regexp, languages) @gem_name = gem_name.to_s @renderer = renderer end def load return if defined?(@loaded) && @loaded require gem_name @loaded = true end def render(filename, content, options: {}) load renderer.call(filename, content, options: options) end def name gem_name end end end end
Version data entries
12 entries across 12 versions & 2 rubygems