Class: Sprout::Executable::StringParam

Inherits:
Param
  • Object
show all
Defined in:
sprout/lib/sprout/executable/string_param.rb

Overview

A parameter with a String value.

Any spaces in the value will be escaped when returned to a shell.

See Also:

Direct Known Subclasses

Url

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=, #default_option_parser_declaration, #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, #prepare_prerequisites, #prepared?, #required?, #short_prefix, #to_rdoc, #to_shell, #validate, #visible?

Constructor Details

This class inherits a constructor from Sprout::Executable::Param

Instance Method Details

- (Object) shell_value



15
16
17
# File 'sprout/lib/sprout/executable/string_param.rb', line 15

def shell_value
  value.gsub(/ /, '\ ')
end