Sha256: 87aab902e7f10f5079c38e1964d6a78ac166e13d13fdfc3ecb3c7ef637a1388f

Contents?: true

Size: 302 Bytes

Versions: 2

Compression:

Stored size: 302 Bytes

Contents

# frozen_string_literal: true

require "hanami/http/status"

module Hanami
  class Action
    module Halt
      # @since 2.0.0
      # @api private
      def self.call(status, body = nil)
        body ||= Http::Status.message_for(status)
        throw :halt, [status, body]
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hanami-controller-2.0.0.beta4 lib/hanami/action/halt.rb
hanami-controller-2.0.0.beta1 lib/hanami/action/halt.rb