ignore punctuation too

This commit is contained in:
Gant
2015-03-21 19:17:15 -05:00
parent 4517fc5266
commit 9fa9947bad

View File

@@ -19,13 +19,13 @@ module RubyMotionQuery
end
# Converts any string to a friendly symbol version.
# Example: RubyMotionQuery::RMQ.symbolize("This is a TEST!")
# Example: RubyMotionQuery::RMQ.symbolize("This is a TEST!!")
# #=> :this_is_a_test
#
# @param [String]
# @return [Symbol]
def symbolize(s)
s.to_s.gsub(/\s+/,"_").downcase.to_sym
s.to_s.gsub(/\s+/,"_").gsub(/\W+/,"").downcase.to_sym
end
# @param view