Class: Sprout::Executable::Path
- Inherits:
-
Param
- Object
- Param
- Sprout::Executable::Path
- Defined in:
- lib/sprout/executable/path.rb
Overview
Concrete Sprout::Executable::Param object for Path values.
Path parameters will create a FileList of prerequisites by concatenating the value with the file_expression that is set on the parameter or Sprout::Executable.
Constant Summary
Constants inherited from Param
DEFAULT_DELIMITER, DEFAULT_OPTION_PARSER_TYPE_NAME, DEFAULT_PREFIX, DEFAULT_SHORT_PREFIX
Instance Method Summary (collapse)
Methods inherited from Param
#clean_path, #default, #default=, #file_is_output?, #hidden_name?, #hidden_value?, #initialize, #option_parser_declaration, #option_parser_name, #option_parser_short_name, #option_parser_type_name, #option_parser_type_output, #prepare, #prepared?, #required?, #shell_value, #short_prefix, #to_rdoc, #to_shell, #validate, #visible?
Constructor Details
This class inherits a constructor from Sprout::Executable::Param
Instance Method Details
- (Object) prepare_prerequisites
15 16 17 18 19 20 21 22 23 |
# File 'lib/sprout/executable/path.rb', line 15 def prepare_prerequisites if(value && !file_is_output?(value)) files = FileList[value + file_expression] files.each do |f| file f belongs_to.prerequisites << f end end end |