Class: RubyUI::Progress
- Defined in:
- lib/ruby_ui/progress/progress.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(value: 0, **attrs) ⇒ Progress
constructor
A new instance of Progress.
- #view_template ⇒ Object
Constructor Details
#initialize(value: 0, **attrs) ⇒ Progress
Returns a new instance of Progress.
5 6 7 8 9 |
# File 'lib/ruby_ui/progress/progress.rb', line 5 def initialize(value: 0, **attrs) @value = value.to_f.clamp(0, 100) super(**attrs) end |
Instance Method Details
#view_template ⇒ Object
11 12 13 14 15 |
# File 'lib/ruby_ui/progress/progress.rb', line 11 def view_template div(**attrs) do div(**indicator_attrs) end end |