Class: Flotte::Registry

Inherits:
Object
  • Object
show all
Defined in:
lib/flotte/registry.rb,
lib/flotte/registry/base.rb,
lib/flotte/registry/host.rb,
lib/flotte/registry/role.rb,
lib/flotte/registry/service.rb

Defined Under Namespace

Classes: Base, Host, Role, Service

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.build(hosts: [], services: [], roles: []) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/flotte/registry.rb', line 8

def self.build(hosts: [], services: [], roles: [])
  registry = new
  registry.hosts.add(hosts)
  registry.services.add(services)
  registry.roles.add(roles)
  registry
end

Instance Method Details

#hostsFlotte::Registry::Host



17
18
19
# File 'lib/flotte/registry.rb', line 17

def hosts
  @hosts_registry ||= Flotte::Registry::Host.new
end

#rolesFlotte::Registry::Role



27
28
29
# File 'lib/flotte/registry.rb', line 27

def roles
  @roles_registry ||= Flotte::Registry::Role.new
end

#servicesFlotte::Registry::Service



22
23
24
# File 'lib/flotte/registry.rb', line 22

def services
  @services_registry ||= Flotte::Registry::Service.new
end