Module: Module::ModuleExtensions::ClassMethods

Defined in:
lib/libmatty/module.rb

Instance Method Summary collapse

Instance Method Details

#const_find(sym) ⇒ Object

like const_get, but doesn’t raise exception if sym not found.



53
54
55
56
57
58
59
# File 'lib/libmatty/module.rb', line 53

def const_find(sym)
    begin
        const_get(sym)
    rescue
        nil
    end
end