Class: InnerPlan::ProgressBarSeparatorComponent
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- InnerPlan::ProgressBarSeparatorComponent
- Defined in:
- app/components/inner_plan/progress_bar_separator_component.rb
Instance Method Summary collapse
-
#initialize(completed: 0, total: 100) ⇒ ProgressBarSeparatorComponent
constructor
A new instance of ProgressBarSeparatorComponent.
- #template ⇒ Object
Constructor Details
#initialize(completed: 0, total: 100) ⇒ ProgressBarSeparatorComponent
Returns a new instance of ProgressBarSeparatorComponent.
3 4 5 6 |
# File 'app/components/inner_plan/progress_bar_separator_component.rb', line 3 def initialize(completed: 0, total: 100) @completed = completed @total = total end |
Instance Method Details
#template ⇒ Object
8 9 10 11 12 |
# File 'app/components/inner_plan/progress_bar_separator_component.rb', line 8 def template div(class: 'progress mt-2', style: 'height: 2px;') { div(class: 'progress-bar bg-success', style: "width: #{completion_percent}%") } end |