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-0.71.1.12 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-0.71.1.11 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-0.71.1.10 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-0.71.1.1 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-0.71.1.0 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-0.71.0.7 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-0.71.0.6 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-0.71.0.4 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-0.71.0.3 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-0.71.0.2 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-0.71.0.1 lib/fiona7/scrivito_patches/type_computer.rb
infopark_fiona7-0.71.0.0 lib/fiona7/scrivito_patches/type_computer.rb