Class: Esbuild::ServeResult
- Inherits:
-
Object
- Object
- Esbuild::ServeResult
- Defined in:
- lib/esbuild/serve_result.rb
Instance Method Summary collapse
-
#initialize(response, wait, stop) ⇒ ServeResult
constructor
A new instance of ServeResult.
- #stop ⇒ Object
- #wait ⇒ Object
Constructor Details
#initialize(response, wait, stop) ⇒ ServeResult
Returns a new instance of ServeResult.
3 4 5 6 7 8 9 |
# File 'lib/esbuild/serve_result.rb', line 3 def initialize(response, wait, stop) @port = response["port"] @host = response["host"] @wait = wait @stop = stop @is_stopped = false end |
Instance Method Details
#stop ⇒ Object
16 17 18 19 20 |
# File 'lib/esbuild/serve_result.rb', line 16 def stop return if @is_stopped @is_stopped = true @stop.call end |
#wait ⇒ Object
11 12 13 14 |
# File 'lib/esbuild/serve_result.rb', line 11 def wait @wait.wait! @wait.value end |