3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/we_love_icon_fonts/base.rb', line 3
def iconfont(icon, options = {})
@options = option_defaults(options)
method = options[:link].empty? ? :create_icon : :create_link
@input_html = generate_input_html(options[:input_html])
@html_attributes = generate_html_attributes(options)
@icon_classes = generate_icon_classes(options)
@content_classes = generate_content_classes(options)
@icon = icon
content =
"
<div class=\"weloveiconfonts__item\">
#{send method}
</div>
"
content = content.html_safe if String.method_defined? :html_safe
content
end
|