Module: Aidp::Interfaces::SpinnerInterface

Included in:
NullSpinner, TtySpinnerWrapper
Defined in:
lib/aidp/interfaces/ui_interface.rb

Overview

SpinnerInterface defines the contract for spinner objects.

Instance Method Summary collapse

Instance Method Details

#auto_spinvoid

This method returns an undefined value.

Start the spinner animation.

Raises:

  • (NotImplementedError)


86
87
88
# File 'lib/aidp/interfaces/ui_interface.rb', line 86

def auto_spin
  raise NotImplementedError, "#{self.class} must implement #auto_spin"
end

#error(message = nil) ⇒ void

This method returns an undefined value.

Stop the spinner with an error indicator.

Parameters:

  • message (String, nil) (defaults to: nil)

    optional error message

Raises:

  • (NotImplementedError)


100
101
102
# File 'lib/aidp/interfaces/ui_interface.rb', line 100

def error(message = nil)
  raise NotImplementedError, "#{self.class} must implement #error"
end

#success(message = nil) ⇒ void

This method returns an undefined value.

Stop the spinner with a success indicator.

Parameters:

  • message (String, nil) (defaults to: nil)

    optional success message

Raises:

  • (NotImplementedError)


93
94
95
# File 'lib/aidp/interfaces/ui_interface.rb', line 93

def success(message = nil)
  raise NotImplementedError, "#{self.class} must implement #success"
end

#update_title(title) ⇒ void

This method returns an undefined value.

Update the spinner title.

Parameters:

  • title (String)

    new title

Raises:

  • (NotImplementedError)


107
108
109
# File 'lib/aidp/interfaces/ui_interface.rb', line 107

def update_title(title)
  raise NotImplementedError, "#{self.class} must implement #update_title"
end