Method: Esvg::SVG#icon_name

Defined in:
lib/esvg/svg.rb

#icon_name(name) ⇒ Object



171
172
173
174
175
176
177
178
179
180
181
182
# File 'lib/esvg/svg.rb', line 171

def icon_name(name)
  if @files[name].nil?
    raise "No icon named #{name} exists at #{config[:path]}"
  end

  name = dasherize(name)
  if config[:namespace_after]
    "#{name}-#{config[:namespace]}"
  else
    "#{config[:namespace]}-#{name}"
  end
end