Module: Xqsr3::StringUtilities::ToSymbol
- Included in:
- String
- Defined in:
- lib/xqsr3/string_utilities/to_symbol.rb
Overview
To-symbol conversion facilities
Class Method Summary collapse
-
.string_to_symbol(s, options = {}) ⇒ Object
Converts the given string
sto a symbol according to the givenoptions.
Instance Method Summary collapse
-
#to_symbol(options = {}) ⇒ Object
Converts the instance to a symbol, according to the given
options.
Class Method Details
.string_to_symbol(s, options = {}) ⇒ Object
Converts the given string s to a symbol according to the given options
Signature
-
Parameters:
-
s(String) The string to convert -
options(Hash) Options hash
-
-
Options:
-
:reject_hyphens(boolean) -
:reject_spaces(boolean) -
:reject_tabs(boolean) -
:reject_whitespace(boolean) -
:transform_characters(boolean)
-
146 147 148 149 |
# File 'lib/xqsr3/string_utilities/to_symbol.rb', line 146 def self.string_to_symbol s, = {} ToSymbol_Helper_. s, end |
Instance Method Details
#to_symbol(options = {}) ⇒ Object
Converts the instance to a symbol, according to the given options
See Xqsr3::StringUtilities::ToSymbol::string_to_symbol for options
154 155 156 157 |
# File 'lib/xqsr3/string_utilities/to_symbol.rb', line 154 def to_symbol = {} ToSymbol_Helper_. self, end |