class Jekyll::LeafletMarker

Public Class Methods

new(tag_name, input, tokens) click to toggle source
Calls superclass method
# File lib/jekyll-leaflet/leaflet-items/leaflet-marker.rb, line 7
def initialize(tag_name, input, tokens)
    super
    if input.empty?
        @input = '{}'
    else
        @input = input
    end
end

Public Instance Methods

render(context) click to toggle source
# File lib/jekyll-leaflet/leaflet-items/leaflet-marker.rb, line 16
def render(context)
    value = parse_liquid_output_in(@input, context)
    '{id: "' + SecureRandom.hex + '",
      type: "LeafletMarker",
      value: ' + value + '},'
end