Class: NattyUI::Task

Inherits:
Temporary show all
Includes:
WithStatus
Defined in:
lib/natty-ui/task.rb

Overview

Task display section used by Features#task.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#active?true, false (readonly) Originally defined in module WithStatus

Returns whether the element is still active.

Returns:

  • (true, false)

    whether the element is still active

#closed?true, false (readonly) Originally defined in module WithStatus

Returns whether the element is completed.

Returns:

  • (true, false)

    whether the element is completed

#failed?true, false (readonly) Originally defined in module WithStatus

Returns whether the element is completed with failure.

Returns:

  • (true, false)

    whether the element is completed with failure

#statusSymbol? (readonly) Originally defined in module WithStatus

Returns element's current status.

Returns:

  • (Symbol, nil)

    element's current status

Instance Method Details

#failed(*text) {|failed| ... } ⇒ Element Originally defined in module WithStatus

Close the element with a failure.

Parameters:

  • text (#to_s)

    optional message

Yields:

  • optionally, when block is given

Yield Parameters:

Returns:

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

Close the element.

Parameters:

  • text (#to_s)

    optional message

Returns:

#ok?true, false Originally defined in module WithStatus

Returns whether the element is completed.

Returns:

  • (true, false)

    whether the element is completed