class GitHub::Markup::GemImplementation
Attributes
gem_name[R]
renderer[R]
Public Class Methods
new(regexp, languages, gem_name, &renderer)
click to toggle source
Calls superclass method
# File lib/github/markup/gem_implementation.rb, line 8 def initialize(regexp, languages, gem_name, &renderer) super(regexp, languages) @gem_name = gem_name.to_s @renderer = renderer end
Public Instance Methods
load()
click to toggle source
# File lib/github/markup/gem_implementation.rb, line 14 def load return if @loaded require gem_name @loaded = true end
name()
click to toggle source
# File lib/github/markup/gem_implementation.rb, line 25 def name gem_name end
render(filename, content)
click to toggle source
# File lib/github/markup/gem_implementation.rb, line 20 def render(filename, content) load renderer.call(filename, content) end