Sha256: 7144060c47450fe003a899bf1dd600ee1d212ff23951417c1c22c16afcd81afc

Contents?: true

Size: 634 Bytes

Versions: 12

Compression:

Stored size: 634 Bytes

Contents

module CLIUtils
  # The generic base class for a Pref
  # Action.
  class PrefAction
    include Messaging

    # Holds the parameters that apply to
    # this Action.
    # @return [Hash]
    attr_accessor :parameters

    # 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.
    # @param [Hash] parameters
    # @raise [StandardError] if the subclass
    #   doesn't implement this method.
    # @return [void]
    def run
      fail "`run` method not implemented on caller: #{ self.class }"
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
cliutils-2.2.6 lib/cliutils/prefs/pref_actions/pref_action.rb
cliutils-2.2.5 lib/cliutils/prefs/pref_actions/pref_action.rb
cliutils-2.2.4 lib/cliutils/prefs/pref_actions/pref_action.rb
cliutils-2.2.3 lib/cliutils/prefs/pref_actions/pref_action.rb
cliutils-2.2.2 lib/cliutils/prefs/pref_actions/pref_action.rb
cliutils-2.2.1 lib/cliutils/prefs/pref_actions/pref_action.rb
cliutils-2.2.0 lib/cliutils/prefs/pref_actions/pref_action.rb
cliutils-2.1.4 lib/cliutils/prefs/pref_actions/pref_action.rb
cliutils-2.1.3 lib/cliutils/prefs/pref_actions/pref_action.rb
cliutils-2.1.2 lib/cliutils/prefs/pref_actions/pref_action.rb
cliutils-2.1.1 lib/cliutils/prefs/pref_actions/pref_action.rb
cliutils-2.1.0 lib/cliutils/prefs/pref_actions/pref_action.rb