lib/garcon/core_ext/object.rb
# Defines module from a string name (e.g. Foo::Bar::Baz). If module already
# exists, no exception raised.
#
# @param [String] name
#   The name of the full module name to make
#
# @return [nil]
#
Defines module from a string name . If module already
exists, no exception raised.
Defines module from a string name . If module already exists no exception raised .
def make_module(string)
    current_module = self
    string.split('::').each do |part|
      current_module = if current_module.const_defined?(part)
        current_module.const_get(part)
      else
        current_module.const_set(part, Module.new)
      end
    end
    current_module
  end
def make_module ( string ) current_module = self string . split ( '::' ) . each do | part | current_module = if current_module . const_defined? ( part ) current_module . const_get ( part ) else current_module . const_set ( part , Module . new ) end end current_module end
Defines module from a string name (e.g.
Defines module from a string name ( e . g .
None
nil
string
<not_specific>
<not_specific>
name The name of the full module name to make
name The name of the full module name to make