class Jekyll::SwaggerTag

Public Class Methods

new(tag_name, markup, tokens) click to toggle source
Calls superclass method
# File lib/jekyll-swagger.rb, line 6
def initialize(tag_name, markup, tokens)
    @spec = markup
    super
end

Public Instance Methods

render(context) click to toggle source
# File lib/jekyll-swagger.rb, line 11
def render(context)
    id = "swagger"+Digest::MD5.hexdigest(@spec)
    %Q{<div class="swagger-section"><div id="#{id}" class="swagger-ui-wrap"></div><script>$(function() { loadSwaggerUi("#{@spec}", "#"+"#{id}"); });</script></div>}
end