Method: Module#const_set_if_not_defined

Defined in:
lib/y_support/core_ext/module/misc.rb

#const_set_if_not_defined(const, value) ⇒ Object

Sets a constant to a value if this has not been previously defined.



47
48
49
# File 'lib/y_support/core_ext/module/misc.rb', line 47

def const_set_if_not_defined( const, value )
  const_set( const, value ) unless const_defined? const
end