Class: UI::Muted

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

Instance Method Summary collapse

Constructor Details

#initialize(classes: nil, **attributes) ⇒ Muted

Returns a new instance of Muted.



5
6
7
8
# File 'app/components/ui/muted.rb', line 5

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

Instance Method Details

#view_template(&block) ⇒ Object



10
11
12
13
14
# File 'app/components/ui/muted.rb', line 10

def view_template(&block)
  extend UI::MutedBehavior

  p(**muted_html_attributes.merge(@attributes), &block)
end