class WebpackDriver::DevServer

A wrapper around an instance of `webpak-dev-server`

Attributes

host[R]
path[R]
port[R]

Public Class Methods

new(config) click to toggle source
Calls superclass method
# File lib/webpack_driver/dev_server.rb, line 8
def initialize(config)
    super('webpack-dev-server', config)
end

Public Instance Methods

valid?() click to toggle source
# File lib/webpack_driver/dev_server.rb, line 12
def valid?
    alive? && last_status == 'success'
end

Private Instance Methods

record_message(msg) click to toggle source
Calls superclass method
# File lib/webpack_driver/dev_server.rb, line 18
def record_message(msg)
    if msg['type'] == 'dev-server'
        @port = msg['value']['port']
        @host = msg['value']['host']
        @path = msg['value']['outputPath']
    end
    super
end