Class: Shipyard::Jekyll::Icon
- Inherits:
-
Liquid::Tag
- Object
- Liquid::Tag
- Shipyard::Jekyll::Icon
- Includes:
- IconHelper
- Defined in:
- lib/shipyard-framework/jekyll/tags/icon_tag.rb
Instance Method Summary collapse
-
#initialize(tag_name, params, options) ⇒ Icon
constructor
A new instance of Icon.
- #render(context) ⇒ Object
Methods included from IconHelper
Constructor Details
#initialize(tag_name, params, options) ⇒ Icon
Returns a new instance of Icon.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/shipyard-framework/jekyll/tags/icon_tag.rb', line 8 def initialize(tag_name, params, ) super @options = {} params.strip.split(',').each_with_index do |arg, index| if index == 0 @name = eval(arg) else @options.merge!(eval("{#{arg}}")) end end end |
Instance Method Details
#render(context) ⇒ Object
20 21 22 |
# File 'lib/shipyard-framework/jekyll/tags/icon_tag.rb', line 20 def render(context) icon @name, @options end |