Module: UU::OS::Lang::ConstantHelper
- Defined in:
- uu_os_commons-1.5.0/lib/uu/os/lang/constant_helper.rb
Overview
Module providing methods const_defined?
and
const_get
allowing
- to use name of constant with
-
even on Ruby < 2.0.
Instance Method Summary (collapse)
-
- (TrueClass, FalseClass) constant_defined?(constant, root = Object)
Checks if constant is defined.
-
- (Object) constant_get(constant, root = Object)
Returns constant value.
Instance Method Details
- (TrueClass, FalseClass) constant_defined?(constant, root = Object)
Checks if constant is defined.
13 14 15 |
# File 'uu_os_commons-1.5.0/lib/uu/os/lang/constant_helper.rb', line 13 def constant_defined?(constant, root = Object) return ConstantHelper.constant_defined?(constant, root) end |
- (Object) constant_get(constant, root = Object)
Returns constant value.
22 23 24 |
# File 'uu_os_commons-1.5.0/lib/uu/os/lang/constant_helper.rb', line 22 def constant_get(constant, root = Object) return ConstantHelper.constant_get(constant, root) end |