Sha256: 7d141b5aee31ab06df3e221395eea56613c29e29c2b8361cff414ad111e0ee17

Contents?: true

Size: 296 Bytes

Versions: 5

Compression:

Stored size: 296 Bytes

Contents

module Esvg::Helpers
  def svg_icons(options={})
    svgs = Esvg.svgs

    if svgs.nil? || !options.empty?
      svgs = Esvg.new(options)
    end

    svgs.read_files if Rails.env.development?

    svgs
  end

  def svg_icon(name, options={})
    svg_icons.use(name, options).html_safe
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
esvg-3.2.0 lib/esvg/helpers.rb
esvg-3.1.0 lib/esvg/helpers.rb
esvg-3.0.0 lib/esvg/helpers.rb
esvg-2.9.2 lib/esvg/helpers.rb
esvg-2.9.1 lib/esvg/helpers.rb