Sha256: 7f3e6eae2d5b7a841a12fd2772a438c8bb15bc1d3f3da62d4cf03d330a46554f

Contents?: true

Size: 817 Bytes

Versions: 11

Compression:

Stored size: 817 Bytes

Contents

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

    def cached_operation_class(class_name)
      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

11 entries across 11 versions & 1 rubygems

Version Path
isomorfeus-operation-1.0.0.zeta5 lib/isomorfeus/operation/config.rb
isomorfeus-operation-1.0.0.zeta4 lib/isomorfeus/operation/config.rb
isomorfeus-operation-1.0.0.zeta3 lib/isomorfeus/operation/config.rb
isomorfeus-operation-1.0.0.zeta2 lib/isomorfeus/operation/config.rb
isomorfeus-operation-1.0.0.zeta1 lib/isomorfeus/operation/config.rb
isomorfeus-operation-1.0.0.epsilon4 lib/isomorfeus/operation/config.rb
isomorfeus-operation-1.0.0.epsilon3 lib/isomorfeus/operation/config.rb
isomorfeus-operation-1.0.0.epsilon2 lib/isomorfeus/operation/config.rb
isomorfeus-operation-1.0.0.epsilon1 lib/isomorfeus/operation/config.rb
isomorfeus-operation-1.0.0.delta12 lib/isomorfeus/operation/config.rb
isomorfeus-operation-1.0.0.delta11 lib/isomorfeus/operation/config.rb