Class: UI::Card

Inherits:
Phlex::HTML
  • Object
show all
Includes:
CardBehavior
Defined in:
app/components/ui/card.rb

Instance Method Summary collapse

Methods included from CardBehavior

#card_classes, #card_html_attributes, #render_card

Constructor Details

#initialize(classes: "", **attributes) ⇒ Card

Returns a new instance of Card.



6
7
8
9
# File 'app/components/ui/card.rb', line 6

def initialize(classes: "", **attributes)
  @classes = classes
  @attributes = attributes
end

Instance Method Details

#view_templateObject



11
12
13
# File 'app/components/ui/card.rb', line 11

def view_template(&)
  div(**card_html_attributes.deep_merge(@attributes), &)
end