Class: UiBibz::Utils::GlyphChanger

Inherits:
Object
  • Object
show all
Defined in:
lib/ui_bibz/utils/glyph_changer.rb

Overview

Glyph changer

=> ui_link 'My link', url: '#', glyph: { type: :group, items: [{ name: 'circle', stataus: :danger },{ name: 'times', inverse: true, transform:'shrink-6'}] }

Instance Method Summary collapse

Constructor Details

#initialize(glyph_options, options = {}) ⇒ GlyphChanger



8
9
10
11
# File 'lib/ui_bibz/utils/glyph_changer.rb', line 8

def initialize(glyph_options, options = {})
  @glyph_options = glyph_options
  @options       = options
end

Instance Method Details

#renderObject



13
14
15
# File 'lib/ui_bibz/utils/glyph_changer.rb', line 13

def render
  @glyph_options.is_a?(Hash) ? glyph_or_glyph_group : glyph_by_hash
end