Class: ElementComponent::Components::Progress
- Defined in:
- lib/element_component/components/progress.rb
Instance Attribute Summary
Attributes inherited from Element
#attributes, #contents, #element, #html
Instance Method Summary collapse
-
#initialize(**attributes) ⇒ Progress
constructor
A new instance of Progress.
Methods inherited from Element
#add_attribute, #add_attribute!, #add_content, #add_content!, #new_element, #remove_attribute, #remove_attribute_value, #render, #reset_attributes!, #reset_contents!
Constructor Details
#initialize(**attributes) ⇒ Progress
Returns a new instance of Progress.
8 9 10 11 12 13 14 |
# File 'lib/element_component/components/progress.rb', line 8 def initialize(**attributes, &) super("div", &) add_attribute(class: "progress") add_attribute(role: "progressbar") add_attribute(attributes) unless attributes.empty? end |