class Jekyll::PlantUmlBlock

Public Class Methods

new(tag_name, markup, tokens) click to toggle source

Plugin initilializer

Calls superclass method
# File lib/jekyll-remote-plantuml.rb, line 38
def initialize(tag_name, markup, tokens)
    super
    @markup = markup;
end

Public Instance Methods

render(context) click to toggle source

Render

Calls superclass method
# File lib/jekyll-remote-plantuml.rb, line 44
def render(context)
    output = super(context);
    #Jekyll.logger.info  "ZZZZZ we got > #{output}"
    code, pconf, baseurl = PlantUmlEncode64.new(output).encode(), PlantUmlConfig::DEFAULT, Jekyll.configuration({})['baseurl'];
    host,port = Jekyll.configuration({})['host'], Jekyll.configuration({})['port']
    p = {:url => pconf[:url], :type => pconf[:type], :code => code }
    #Jekyll.logger.info "Generate html with input params  :", p;
    #d = RemoteLoader.instance.savedRemoteBinary(p);
    d = RemoteLoader.instance.savedRemoteBinaryBase64(p);
    #puts d
    return "#{d}"
    #return "<img src=\"http://#{host}:#{port}/%{baseurl}%{uri}\" />" % d.merge({ :baseurl => baseurl });
end