Sha256: 4495c24ab9a2a0f6051a804c6ff1e2e56e9780b234017949334365c7321e7d0a

Contents?: true

Size: 229 Bytes

Versions: 7

Compression:

Stored size: 229 Bytes

Contents

require "hanami/http/status"

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
hanami-controller-2.0.0.alpha8 lib/hanami/action/halt.rb
hanami-controller-2.0.0.alpha6 lib/hanami/action/halt.rb
hanami-controller-2.0.0.alpha5 lib/hanami/action/halt.rb
hanami-controller-2.0.0.alpha4 lib/hanami/action/halt.rb
hanami-controller-2.0.0.alpha3 lib/hanami/action/halt.rb
hanami-controller-2.0.0.alpha2 lib/hanami/action/halt.rb
hanami-controller-2.0.0.alpha1 lib/hanami/action/halt.rb