Class: CLIUtils::PrefAction

Inherits:
Object
  • Object
show all
Includes:
Messaging
Defined in:
lib/cliutils/prefs/pref_actions/pref_action.rb

Overview

The generic base class for a Pref Action.

Direct Known Subclasses

OpenUrlAction

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Messaging

#messenger

Instance Attribute Details

#parametersHash

Holds the parameters that apply to this Action.

Returns:



10
11
12
# File 'lib/cliutils/prefs/pref_actions/pref_action.rb', line 10

def parameters
  @parameters
end

Instance Method Details

#runvoid

This method returns an undefined value.

Runs the Action. Note that the method implemented here will throw an exception by default, meaning that the user’s subclass needs to implement it.

Parameters:

Raises:

  • (StandardError)

    if the subclass doesn’t implement this method.



21
22
23
# File 'lib/cliutils/prefs/pref_actions/pref_action.rb', line 21

def run
  fail "`run` method not implemented on caller: #{ self.class }"
end