Sha256: 77b5c5e680e545ef9972e1e2594308d8206fa5b45ab8b3ea40a74c48c5673c68

Contents?: true

Size: 421 Bytes

Versions: 3

Compression:

Stored size: 421 Bytes

Contents

module Happy
  class Controller
    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 Errors::NotFound
        end

        response
      end

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
happy-0.1.0.pre11 lib/happy/controller/rackable.rb
happy-0.1.0.pre10 lib/happy/controller/rackable.rb
happy-0.1.0.pre9 lib/happy/controller/rackable.rb