Class: Stylish::Developer::Environment

Inherits:
Object
  • Object
show all
Defined in:
lib/stylish/developer/environment.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#loggerObject (readonly)

Returns the value of attribute logger.



12
13
14
# File 'lib/stylish/developer/environment.rb', line 12

def logger
  @logger
end

#spawnsObject (readonly)

Returns the value of attribute spawns.



12
13
14
# File 'lib/stylish/developer/environment.rb', line 12

def spawns
  @spawns
end

Class Method Details

.start(options = {}) {|reloader| ... } ⇒ Object

Yields:

  • (reloader)


5
6
7
8
9
10
# File 'lib/stylish/developer/environment.rb', line 5

def self.start options={}, &block
    reloader = new(options)
    yield(reloader) if block_given?
    reloader.start()
    Spawnling.wait(reloader.spawns)
end

Instance Method Details

#startObject



14
15
16
17
18
19
20
# File 'lib/stylish/developer/environment.rb', line 14

def start
  @spawns = []

  @spawns << Spawnling.new { start_library_server() }
  @spawns << Spawnling.new { start_watcher_service() }
  #@spawns << Spawnling.new { start_push_service() }
end