Sha256: d6ff3baafa1db2291fce8434c7728a956e1ccc8928ea0f160b2aaf32e5aea013

Contents?: true

Size: 650 Bytes

Versions: 1

Compression:

Stored size: 650 Bytes

Contents

require 'ebb'

module Ramaze
  module Adapter
    class Ebb < Base
      class << self

        # start server on given host and port.
        def run_server host, port
          server = ::Ebb::Server.new(self, :port => port)

          thread = Thread.new{ server.start }
          thread[:adapter] = server
          thread
        end
      end
    end
  end

  class Response
    def finish(&block)
      @block = block

      if [201, 204, 304].include?(status.to_i)
        header.delete "Content-Type"
        [status.to_i, header.to_hash, '']
      else
        [status.to_i, header.to_hash, [body].flatten.join]
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ramaze-0.3.9.1 lib/ramaze/adapter/ebb.rb