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
s
to 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 that control the behaviour of the method;
-
-
Options:
-
:reject_hyphens
(boolean); -
:reject_spaces
(boolean); -
:reject_tabs
(boolean); -
:reject_whitespace
(boolean); -
:transform_characters
(boolean);
-
143 144 145 146 |
# File 'lib/xqsr3/string_utilities/to_symbol.rb', line 143 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
151 152 153 154 |
# File 'lib/xqsr3/string_utilities/to_symbol.rb', line 151 def to_symbol = {} ToSymbol_Helper_. self, end |