Sha256: 18a21f537b4cb0dcb8ed0c337f370104cec7657c3e0615d912f6eb450c5ccd6a

Contents?: true

Size: 636 Bytes

Versions: 4

Compression:

Stored size: 636 Bytes

Contents

module CLIUtils
  # The generic base class for a Pref
  # Behavior.
  class PrefBehavior
    include Messaging

    # Holds the parameters associated with
    # this behavior.
    # @return [Hash]
    attr_accessor :parameters

    # Holds a reference to the Pref that
    # is applying this Behavior.
    # @return [Pref]
    attr_accessor :pref

    # Evaluate the Behavior!
    # @parameter [Hash] parameters
    # @raise [StandardError] if the subclass
    #   doesn't implement this method.
    # @return [void]
    def evaluate(text = '')
      fail "`evaluate` method not implemented on caller: #{ self.class }"
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cliutils-2.0.3 lib/cliutils/prefs/pref_behaviors/pref_behavior.rb
cliutils-2.0.2 lib/cliutils/prefs/pref_behaviors/pref_behavior.rb
cliutils-2.0.1 lib/cliutils/prefs/pref_behaviors/pref_behavior.rb
cliutils-2.0.0 lib/cliutils/prefs/pref_behaviors/pref_behavior.rb