Module: Vorpal::Util::StringUtils

Extended by:
StringUtils
Included in:
StringUtils
Defined in:
lib/vorpal/util/string_utils.rb

Instance Method Summary collapse

Instance Method Details

#escape_class_name(class_name) ⇒ Object

Escapes the name of a class so that it can be embedded into the name of another class. This means that the result should always be ‘#const_defined?` friendly.



10
11
12
# File 'lib/vorpal/util/string_utils.rb', line 10

def escape_class_name(class_name)
  class_name.gsub("::", "__")
end