Sha256: 415793dcfe83ce27b69936d3dc067e1d49a83536c833209e8aedc17e587720b1

Contents?: true

Size: 340 Bytes

Versions: 3

Compression:

Stored size: 340 Bytes

Contents

# frozen_string_literal: true

require "hanami/http/status"

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hanami-controller-2.0.1 lib/hanami/action/halt.rb
hanami-controller-2.0.0 lib/hanami/action/halt.rb
hanami-controller-2.0.0.rc1 lib/hanami/action/halt.rb