Class: Server

Inherits:
Object
  • Object
show all
Defined in:
lib/local-server.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(generator, opts) ⇒ Server

Returns a new instance of Server.



8
9
10
11
12
# File 'lib/local-server.rb', line 8

def initialize(generator, opts)
  @opts = opts
  @generator = generator
  @needs_reload = false
end

Instance Attribute Details

#generatorObject (readonly)

Returns the value of attribute generator.



6
7
8
# File 'lib/local-server.rb', line 6

def generator
  @generator
end

#optsObject (readonly)

Returns the value of attribute opts.



6
7
8
# File 'lib/local-server.rb', line 6

def opts
  @opts
end

Instance Method Details

#startObject



14
15
16
17
18
19
20
21
# File 'lib/local-server.rb', line 14

def start
  start_file_watcher
  start_reload_server
  open_browser
  start_local_server
ensure
  clean_build_dir
end