Sha256: bff47b8ef8c1ff4af6ce6c617ce2d50d1f691a1802894222cc11beae6cf40386

Contents?: true

Size: 601 Bytes

Versions: 52

Compression:

Stored size: 601 Bytes

Contents

require 'scrivito/type_computer'

module Scrivito
  class TypeComputer
    private

    def load_class(obj_class_name)
      return nil if obj_class_name.nil?

      begin
        klass = obj_class_name.constantize
        klass = nil if !inherits_from_base?(klass)
      rescue NameError
        klass = ::ShadowClasses.const_get(obj_class_name)
        klass = nil if !inherits_from_base?(klass)
      end

      if !klass
        klass = ::ShadowClasses.const_get(obj_class_name)
        klass if inherits_from_base?(klass)
      else
        klass
      end
    rescue NameError
    end
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
infopark_fiona7-1.6.1.1.5 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-1.6.1.1.1 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-1.6.1.1.0 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-1.2.0.2.3 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-1.2.0.2.1 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-1.2.0.2.2 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-1.5.5.5.1 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-1.5.5.5.0 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-1.2.0.1.4 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-1.5.5.4.1 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-1.5.5.4.0 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-1.2.0.1.3 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-1.5.5.3.1 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-1.5.4.3.0 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-1.5.3.2.0 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-1.5.3.2.0.pre.beta1 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-1.5.2.1.0.pre.beta1 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-1.5.2.0.0 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-1.2.0.1.1 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-1.2.0.0.1 lib/fiona7/scrivito_patches/type_computer.rb