Sha256: 13f38f1494b1a2e4bcd12c6a317cab80e3826592761ba5d9664052ecad69c141

Contents?: true

Size: 432 Bytes

Versions: 7

Compression:

Stored size: 432 Bytes

Contents

module Happy
  module ControllerExtensions
    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

7 entries across 7 versions & 1 rubygems

Version Path
happy-0.1.0.pre8 lib/happy/controller_ext/rackable.rb
happy-0.1.0.pre7 lib/happy/controller_ext/rackable.rb
happy-0.1.0.pre.6 lib/happy/controller_ext/rackable.rb
happy-0.1.0.pre.5 lib/happy/controller_ext/rackable.rb
happy-0.1.0.pre.4 lib/happy/controller_ext/rackable.rb
happy-0.1.0.pre.3 lib/happy/controller_ext/rackable.rb
happy-0.1.0.pre.2 lib/happy/controller_ext/rackable.rb