Class: UiBibz::ViewObjects::GlyphComponentViewObject

Inherits:
Object
  • Object
show all
Defined in:
lib/ui_bibz/view_objects/glyph_component_view_object.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options, content = nil) ⇒ GlyphComponentViewObject

Returns a new instance of GlyphComponentViewObject.



8
9
10
11
# File 'lib/ui_bibz/view_objects/glyph_component_view_object.rb', line 8

def initialize(options, content = nil)
  @options = options
  @content = content
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



6
7
8
# File 'lib/ui_bibz/view_objects/glyph_component_view_object.rb', line 6

def content
  @content
end

#optionsObject

Returns the value of attribute options.



6
7
8
# File 'lib/ui_bibz/view_objects/glyph_component_view_object.rb', line 6

def options
  @options
end

Instance Method Details

#renderObject



13
14
15
# File 'lib/ui_bibz/view_objects/glyph_component_view_object.rb', line 13

def render
  UiBibz::Ui::Core::Icons::Glyph.new(glyph_options[:name], mute_glyph_option).render if glyph_options[:name].present?
end