Sha256: 0fab6af0bf4158a1508c6e0caf7b9a0595dd6e865574b156521b1fbcd82cf4d5

Contents?: true

Size: 359 Bytes

Versions: 1

Compression:

Stored size: 359 Bytes

Contents

module Happy
  module Rackable
    extend ActiveSupport::Concern

    def call(env)
      @env = env

      catch :done do
        serve! perform

        # If we get here, #serve decided not to serve.
        raise NotFoundError
      end

      response
    end

    module ClassMethods
      def call(env)
        new.call(env)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
happy-0.1.0.pre.1 lib/happy/rackable.rb