Module: Cakewalk::Utilities::Kernel Private
- Defined in:
- lib/cakewalk/utilities/kernel.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Class Method Summary collapse
-
.string_to_const(s) ⇒ Object
private
Class Method Details
.string_to_const(s) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
7 8 9 10 |
# File 'lib/cakewalk/utilities/kernel.rb', line 7 def self.string_to_const(s) return s unless s.is_a?(::String) s.split("::").inject(Kernel) {|base, name| base.const_get(name) } end |