Class: CLIUtils::ExpandFilepathBehavior

Inherits:
PrefBehavior show all
Defined in:
lib/cliutils/prefs/pref_behaviors/expand_filepath_behavior.rb

Overview

A Behavior to run File.expand_path on a Pref answer

Instance Attribute Summary

Attributes inherited from PrefBehavior

#parameters

Instance Method Summary collapse

Methods included from Messaging

#messenger

Instance Method Details

#evaluate(text) ⇒ String

Evaluates the behavior against the text.

Parameters:

  • text (Object)

    The “text” to evaluate

Returns:



8
9
10
# File 'lib/cliutils/prefs/pref_behaviors/expand_filepath_behavior.rb', line 8

def evaluate(text)
  File.expand_path(text.to_s)
end