Class: StaticRails::ServerStore

Inherits:
Object
  • Object
show all
Defined in:
lib/static-rails/server_store.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.instanceObject



5
6
7
# File 'lib/static-rails/server_store.rb', line 5

def self.instance
  @instance ||= new
end

Instance Method Details

#ensure_all_servers_are_startedObject



9
10
11
12
13
# File 'lib/static-rails/server_store.rb', line 9

def ensure_all_servers_are_started
  StaticRails.config.sites.select(&:start_server).each do |site|
    server_for(site).start
  end
end

#server_for(site) ⇒ Object



15
16
17
# File 'lib/static-rails/server_store.rb', line 15

def server_for(site)
  @servers[site] ||= Server.new(site)
end