Class: Primer::ProgressBarComponent::Item
- Inherits:
-
ViewComponent::Slot
- Object
- ViewComponent::Slot
- Primer::ProgressBarComponent::Item
- Includes:
- ClassNameHelper
- Defined in:
- app/components/primer/progress_bar_component.rb
Instance Attribute Summary collapse
-
#system_arguments ⇒ Object
readonly
Returns the value of attribute system_arguments.
Instance Method Summary collapse
-
#initialize(percentage: 0, bg: :green, **system_arguments) ⇒ Item
constructor
A new instance of Item.
Methods included from ClassNameHelper
Constructor Details
#initialize(percentage: 0, bg: :green, **system_arguments) ⇒ Item
65 66 67 68 69 70 71 72 73 |
# File 'app/components/primer/progress_bar_component.rb', line 65 def initialize(percentage: 0, bg: :green, **system_arguments) @percentage = percentage @system_arguments = system_arguments @system_arguments[:tag] = :span @system_arguments[:bg] = bg @system_arguments[:style] = "width: #{@percentage}%;" @system_arguments[:classes] = class_names("Progress-item", @system_arguments[:classes]) end |
Instance Attribute Details
#system_arguments ⇒ Object (readonly)
Returns the value of attribute system_arguments.
60 61 62 |
# File 'app/components/primer/progress_bar_component.rb', line 60 def system_arguments @system_arguments end |