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

Instance Method Summary collapse

Instance Attribute Details

#maxFloat

Returns:

  • (Float)


34
35
36
# File 'lib/natty-ui/progress.rb', line 34

def max
  @max
end

#statusObject (readonly) Originally defined in module WithStatus

Returns the value of attribute status.

#titleString

Returns:

  • (String)


14
15
16
# File 'lib/natty-ui/progress.rb', line 14

def title
  @title
end

#valueFloat

Returns:

  • (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

Returns:

  • (Boolean)

#closed?Boolean Originally defined in module WithStatus

Returns:

  • (Boolean)

#failed(*text, &block) ⇒ Object Originally defined in module WithStatus

#failed?Boolean Originally defined in module WithStatus

Returns:

  • (Boolean)

#ok(*text) ⇒ Object Also known as: done Originally defined in module WithStatus

#ok?Boolean Originally defined in module WithStatus

Returns:

  • (Boolean)

#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