Method: Anyicon::Icon#render

Defined in:
lib/anyicon/icon.rb

#renderString

Renders the SVG content for the specified icons.

Returns:

  • (String)

    the HTML-safe SVG content



34
35
36
37
38
39
40
41
# File 'lib/anyicon/icon.rb', line 34

def render
  result = "".html_safe
  @icons.each do |icon|
    ensure_icon_exists(icon)
    result.concat(svg_content(icon).html_safe)
  end
  result
end