lib/geo_pattern/helpers.rb
# Removes the module part from the expression in the string.
#
# @see ActiveSupport
#   It's MIT-Licensed
#
# @exmple Use demodulize
#
#   'ActiveRecord::CoreExtensions::String::Inflections'.demodulize # => "Inflections"
#   'Inflections'.demodulize                                       # => "Inflections"
#   '::Inflections'.demodulize                                     # => "Inflections"
#   ''.demodulize                                                  # => ""
#
# See also +deconstantize+.
Removes the module part from the expression in the string.
Removes the module part from the expression in the string .
def demodulize(path)
      path = path.to_s
      if (i = path.rindex("::"))
        path[(i + 2)..]
      else
        path
      end
    end
def demodulize ( path ) path = path . to_s if ( i = path . rindex ( "::" ) ) path [ ( i + 2 ) .. ] else path end end
Removes the module part from the expression in the string.
Removes the module part from the expression in the string .
path
<not_specific>
see
ActiveSupport It's MIT-Licensed
ActiveSupport It ' s MIT - Licensed
exmple
None