Sha256: e368390e1852b2620480b05c470bab6d1edd1db9d9293986688ab5d67321f854

Contents?: true

Size: 916 Bytes

Versions: 47

Compression:

Stored size: 916 Bytes

Contents

module Isomorfeus
  class << self
    def cached_operation_classes
      @cached_operation_classes ||= {}
    end

    def cached_operation_class(class_name)
      return "::#{class_name}".constantize if Isomorfeus.development?
      return cached_operation_classes[class_name] if cached_operation_classes.key?(class_name)
      cached_operation_classes[class_name] = "::#{class_name}".constantize
    end

    if RUBY_ENGINE != 'opal'
      def valid_operation_class_names
        @valid_operation_class_names ||= Set.new
      end

      def valid_operation_class_name?(class_name)
        valid_operation_class_names.include?(class_name)
      end

      def add_valid_operation_class(klass)
        class_name = klass.name
        class_name = class_name.split('>::').last if class_name.start_with?('#<')
        valid_operation_class_names << class_name
      end
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
isomorfeus-operation-2.0.16 lib/isomorfeus/operation/config.rb
isomorfeus-operation-2.0.15 lib/isomorfeus/operation/config.rb
isomorfeus-operation-2.0.14 lib/isomorfeus/operation/config.rb
isomorfeus-operation-2.0.13 lib/isomorfeus/operation/config.rb
isomorfeus-operation-2.0.12 lib/isomorfeus/operation/config.rb
isomorfeus-operation-2.0.11 lib/isomorfeus/operation/config.rb
isomorfeus-operation-2.0.10 lib/isomorfeus/operation/config.rb
isomorfeus-operation-2.0.9 lib/isomorfeus/operation/config.rb
isomorfeus-operation-2.0.8 lib/isomorfeus/operation/config.rb
isomorfeus-operation-2.0.7 lib/isomorfeus/operation/config.rb
isomorfeus-operation-2.0.6 lib/isomorfeus/operation/config.rb
isomorfeus-operation-2.0.5 lib/isomorfeus/operation/config.rb
isomorfeus-operation-2.0.4 lib/isomorfeus/operation/config.rb
isomorfeus-operation-2.0.3 lib/isomorfeus/operation/config.rb
isomorfeus-operation-2.0.2 lib/isomorfeus/operation/config.rb
isomorfeus-operation-2.0.1 lib/isomorfeus/operation/config.rb
isomorfeus-operation-2.0.0 lib/isomorfeus/operation/config.rb
isomorfeus-operation-2.0.0.rc10 lib/isomorfeus/operation/config.rb
isomorfeus-operation-2.0.0.rc9 lib/isomorfeus/operation/config.rb
isomorfeus-operation-2.0.0.rc8 lib/isomorfeus/operation/config.rb