class Jekyll::ResponsiveImage::Tag
Public Class Methods
new(tag_name, markup, tokens)
click to toggle source
Calls superclass method
# File lib/jekyll/responsive_image/tag.rb, line 4 def initialize(tag_name, markup, tokens) super @attributes = {} markup.scan(::Liquid::TagAttributes) do |key, value| # Strip quotes from around attribute values @attributes[key] = value.gsub(/^['"]|['"]$/, '') end end
Public Instance Methods
render(context)
click to toggle source
# File lib/jekyll/responsive_image/tag.rb, line 15 def render(context) Renderer.new(context.registers[:site], @attributes).render_responsive_image end