Sha256: 01e16d7148ea1cb14800dc7289af0ca89c1c813ce5ec69d8b0e86e23136bc3f6

Contents?: true

Size: 370 Bytes

Versions: 5

Compression:

Stored size: 370 Bytes

Contents

module Esbuild
  class ServeResult
    def initialize(response, wait, stop)
      @port = response["port"]
      @host = response["host"]
      @wait = wait
      @stop = stop
      @is_stopped = false
    end

    def wait
      @wait.wait!
      @wait.value
    end

    def stop
      return if @is_stopped
      @is_stopped = true
      @stop.call
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
esbuild-0.2.1 lib/esbuild/serve_result.rb
esbuild-0.2.0 lib/esbuild/serve_result.rb
esbuild-0.1.2 lib/esbuild/serve_result.rb
esbuild-0.1.1 lib/esbuild/serve_result.rb
esbuild-0.1.0 lib/esbuild/serve_result.rb