Sha256: e666dc0e9e62352fd1bdba0cd2e57de49a985bce66430f0c10fc7f9c3096f555

Contents?: true

Size: 590 Bytes

Versions: 18

Compression:

Stored size: 590 Bytes

Contents

# frozen_string_literal: true

module Hanami
  class Router
    # HTTP Redirect
    #
    # @since 2.0.0
    # @api private
    class Redirect
      # @since 2.0.0
      # @api private
      attr_reader :destination

      # @since 2.0.0
      # @api private
      attr_reader :code

      # @since 2.0.0
      # @api private
      def initialize(destination, code, endpoint)
        @destination = destination
        @code = code
        @endpoint = endpoint
      end

      # @since 2.0.0
      # @api private
      def call(env)
        @endpoint.call(env)
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
hanami-router-2.2.0 lib/hanami/router/redirect.rb
hanami-router-2.2.0.rc1 lib/hanami/router/redirect.rb
hanami-router-2.2.0.beta2 lib/hanami/router/redirect.rb
hanami-router-2.2.0.beta1 lib/hanami/router/redirect.rb
hanami-router-2.1.0 lib/hanami/router/redirect.rb
hanami-router-2.1.0.rc3 lib/hanami/router/redirect.rb
hanami-router-2.1.0.rc2 lib/hanami/router/redirect.rb
hanami-router-2.1.0.rc1 lib/hanami/router/redirect.rb
hanami-router-2.1.0.beta1 lib/hanami/router/redirect.rb
hanami-router-2.0.2 lib/hanami/router/redirect.rb
hanami-router-2.0.1 lib/hanami/router/redirect.rb
hanami-router-2.0.0 lib/hanami/router/redirect.rb
hanami-router-2.0.0.rc1 lib/hanami/router/redirect.rb
hanami-router-2.0.0.beta4 lib/hanami/router/redirect.rb
hanami-router-2.0.0.beta2 lib/hanami/router/redirect.rb
hanami-router-2.0.0.beta1 lib/hanami/router/redirect.rb
hanami-router-2.0.0.alpha6 lib/hanami/router/redirect.rb
hanami-router-2.0.0.alpha5 lib/hanami/router/redirect.rb