Class: IconHelper::IconCreator

Inherits:
Object
  • Object
show all
Includes:
ActionView::Helpers, FormatHelper, ValidIcons
Defined in:
app/helpers/icon_helper.rb

Constant Summary

Constants included from ValidIcons

ValidIcons::VALID_ICONS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from FormatHelper

#parse_content_or_options, #prepend_class, #squeeze_n_strip

Constructor Details

#initialize(type, options) ⇒ IconCreator

Returns a new instance of IconCreator.



11
12
13
14
# File 'app/helpers/icon_helper.rb', line 11

def initialize(type, options)
  @type    = type.to_s.tr('_', '-')
  @options = options
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



9
10
11
# File 'app/helpers/icon_helper.rb', line 9

def options
  @options
end

#typeObject

Returns the value of attribute type.



8
9
10
# File 'app/helpers/icon_helper.rb', line 8

def type
  @type
end

Instance Method Details

#renderObject



16
17
18
19
20
# File 'app/helpers/icon_helper.rb', line 16

def render
  render_fa_class(options)

   :i, nil, options
end