Sha256: 3bd924547b4d08017a5325277882dfb056debbad33bcf441990b4dac35e08324

Contents?: true

Size: 178 Bytes

Versions: 10

Compression:

Stored size: 178 Bytes

Contents

module ActiveMocker

  def self.class_exists?(class_name)
    klass = Module.const_get(class_name)
    return klass.is_a?(Class)
  rescue NameError
    return false
  end

end


Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
active_mocker-1.4.2 lib/active_mocker/class_exists.rb
active_mocker-1.4.1 lib/active_mocker/class_exists.rb
active_mocker-1.3.2 lib/active_mocker/class_exists.rb
active_mocker-1.3.1 lib/active_mocker/class_exists.rb
active_mocker-1.3 lib/active_mocker/class_exists.rb
active_mocker-1.2.4 lib/active_mocker/class_exists.rb
active_mocker-1.2.3 lib/active_mocker/class_exists.rb
active_mocker-1.2 lib/active_mocker/class_exists.rb
active_mocker-1.2.pre.11 lib/active_mocker/class_exists.rb
active_mocker-1.2.pre.10 lib/active_mocker/class_exists.rb