Class: PhlexyUI::AvatarGroup
- Defined in:
- lib/phlexy_ui/avatar_group.rb
Instance Method Summary collapse
- #avatar ⇒ Object
-
#initialize(as: :div) ⇒ AvatarGroup
constructor
A new instance of AvatarGroup.
- #view_template ⇒ Object
Constructor Details
#initialize(as: :div) ⇒ AvatarGroup
Returns a new instance of AvatarGroup.
5 6 7 8 |
# File 'lib/phlexy_ui/avatar_group.rb', line 5 def initialize(*, as: :div, **) super(*, **) @as = as end |
Instance Method Details
#avatar ⇒ Object
19 20 21 |
# File 'lib/phlexy_ui/avatar_group.rb', line 19 def avatar(*, **, &) render PhlexyUI::Avatar.new(*, **, &) end |
#view_template ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/phlexy_ui/avatar_group.rb', line 10 def view_template(&) generate_classes!( component_html_class: :"avatar-group", options: ).then do |classes| public_send(as, class: classes, **, &) end end |