class Jekyll::LeafletGeoJSON
Public Class Methods
new(tag_name, input, tokens)
click to toggle source
Calls superclass method
# File lib/jekyll-leaflet/leaflet-items/leaflet-geojson.rb, line 6 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-geojson.rb, line 15 def render(context) value = parse_liquid_output_in(@input, context) '{id: "' + SecureRandom.hex + '", type: "LeafletGeoJSON", value: ' + value + '},' end