Class: Module

Inherits:
Object show all
Defined in:
lib/reek/code_context.rb

Instance Method Summary collapse

Instance Method Details

#const_or_nil(sym) ⇒ Object



3
4
5
# File 'lib/reek/code_context.rb', line 3

def const_or_nil(sym)
  const_defined?(sym) ? const_get(sym) : nil
end