class
String
v2.1.0 -
Show latest stable
- Superclass: Object
No documentation available for this class.
Included modules
- ActiveSupport::CoreExtensions::String::Access
- ActiveSupport::CoreExtensions::String::Conversions
- ActiveSupport::CoreExtensions::String::Filters
- ActiveSupport::CoreExtensions::String::Inflections
- ActiveSupport::CoreExtensions::String::Iterators
- ActiveSupport::CoreExtensions::String::StartsEndsWith
- ActiveSupport::CoreExtensions::String::Unicode
Files
- activesupport/lib/active_support/core_ext/blank.rb
- activesupport/lib/active_support/core_ext/string.rb
- activesupport/lib/active_support/core_ext/string/xchar.rb
- activesupport/lib/active_support/json/encoders/string.rb
2Notes
constantize
@ncancelliere - Instead use constantize which is provided as part of ActiveSupport. It is much easier. So:
mystring.constantize
Convert String to Class
this example shows how you can take a string and # make it a class and then send it a method
Kernel.const_get(my_string.capitalize).select_options