Sha256: 7a7aa38ecabc8e32ae03cdff171997cad0d1171d705a6af26a4a2acbfaca20ef

Contents?: true

Size: 691 Bytes

Versions: 27

Compression:

Stored size: 691 Bytes

Contents

# frozen_string_literal: true

require "connection_pool"
require_relative "server_rendering_pool/exec"
require_relative "server_rendering_pool/node"

# Based on the react-rails gem.
# None of these methods should be called directly.
# See app/helpers/react_on_rails_helper.rb
module ReactOnRails
  module ServerRenderingPool
    class << self
      def pool
        if ReactOnRails.configuration.server_render_method == "NodeJS"
          ServerRenderingPool::Node
        else
          ServerRenderingPool::Exec
        end
      end

      # rubocop:disable Style/MethodMissing
      def method_missing(sym, *args, &block)
        pool.send sym, *args, &block
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
react_on_rails-10.0.2 lib/react_on_rails/server_rendering_pool.rb
react_on_rails-10.0.1 lib/react_on_rails/server_rendering_pool.rb
react_on_rails-10.0.0 lib/react_on_rails/server_rendering_pool.rb
react_on_rails-9.0.3 lib/react_on_rails/server_rendering_pool.rb
react_on_rails-9.0.2 lib/react_on_rails/server_rendering_pool.rb
react_on_rails-9.0.1 lib/react_on_rails/server_rendering_pool.rb
react_on_rails-9.0.0 lib/react_on_rails/server_rendering_pool.rb
react_on_rails-9.0.0.rc.0 lib/react_on_rails/server_rendering_pool.rb
react_on_rails-9.0.0.beta.12 lib/react_on_rails/server_rendering_pool.rb
react_on_rails-9.0.0.beta.11 lib/react_on_rails/server_rendering_pool.rb
react_on_rails-9.0.0.beta.10 lib/react_on_rails/server_rendering_pool.rb
react_on_rails-9.0.0.beta.9 lib/react_on_rails/server_rendering_pool.rb
react_on_rails-9.0.0.beta.8 lib/react_on_rails/server_rendering_pool.rb
react_on_rails-9.0.0.beta.7 lib/react_on_rails/server_rendering_pool.rb
react_on_rails-9.0.0.beta.6 lib/react_on_rails/server_rendering_pool.rb
react_on_rails-9.0.0.beta.5 lib/react_on_rails/server_rendering_pool.rb
react_on_rails-9.0.0.beta.4 lib/react_on_rails/server_rendering_pool.rb
react_on_rails-9.0.0.beta.3 lib/react_on_rails/server_rendering_pool.rb
react_on_rails-9.0.0.beta.2 lib/react_on_rails/server_rendering_pool.rb
react_on_rails-9.0.0.beta.1 lib/react_on_rails/server_rendering_pool.rb