Sha256: 08920863e0aa845766a9d472c943a0a166950d8c541f8311c3d96f8279a25fd3
Contents?: true
Size: 466 Bytes
Versions: 16
Compression:
Stored size: 466 Bytes
Contents
# Copyright (c) 2015 Sqreen. All Rights Reserved. # Please refer to our terms for more information: https://www.sqreen.io/terms.html module Sqreen module Dependency def self.const_exist?(name) resolve_const(name) && true rescue NameError, ArgumentError false end def self.resolve_const(name) raise ArgumentError if name.nil? || name.empty? name.to_s.split('::').inject(Object) { |a, e| a.const_get(e) } end end end
Version data entries
16 entries across 16 versions & 1 rubygems