Module: NattyUI::ProgressHelper
- Includes:
- WithStatus
- Defined in:
- lib/natty-ui/progress.rb
Overview
TODO:
This chapter needs more documentation.
Progress indictaor helper used by Features#progress.
Instance Attribute Summary collapse
- #max ⇒ Float
-
#status ⇒ Object
included
from WithStatus
readonly
Returns the value of attribute status.
- #title ⇒ String
- #value ⇒ Float
Instance Method Summary collapse
- #active? ⇒ Boolean included from WithStatus
- #closed? ⇒ Boolean included from WithStatus
- #failed(*text, &block) ⇒ Object included from WithStatus
- #failed? ⇒ Boolean included from WithStatus
- #ok(*text) ⇒ Object (also: #done) included from WithStatus
- #ok? ⇒ Boolean included from WithStatus
- #step(count: 1, title: nil) ⇒ Object
Instance Attribute Details
#max ⇒ Float
34 35 36 |
# File 'lib/natty-ui/progress.rb', line 34 def max @max end |
#status ⇒ Object (readonly) Originally defined in module WithStatus
Returns the value of attribute status.
#title ⇒ String
14 15 16 |
# File 'lib/natty-ui/progress.rb', line 14 def title @title end |
#value ⇒ Float
23 24 25 |
# File 'lib/natty-ui/progress.rb', line 23 def value @value end |
Instance Method Details
#active? ⇒ Boolean Originally defined in module WithStatus
#closed? ⇒ Boolean Originally defined in module WithStatus
#failed(*text, &block) ⇒ Object Originally defined in module WithStatus
#failed? ⇒ Boolean Originally defined in module WithStatus
#ok(*text) ⇒ Object Also known as: done Originally defined in module WithStatus
#ok? ⇒ Boolean Originally defined in module WithStatus
#step(count: 1, title: nil) ⇒ Object
47 48 49 50 51 |
# File 'lib/natty-ui/progress.rb', line 47 def step(count: 1, title: nil) @title = title if title self.value += count self end |