Class: Construqt::Services

Inherits:
Object
  • Object
show all
Defined in:
lib/construqt/services.rb

Defined Under Namespace

Classes: DhcpV4Relay, DhcpV6Relay, Radvd

Instance Method Summary collapse

Constructor Details

#initializeServices

Returns a new instance of Services.



37
38
39
# File 'lib/construqt/services.rb', line 37

def initialize
  @services = {}
end

Instance Method Details

#add(service) ⇒ Object



47
48
49
50
# File 'lib/construqt/services.rb', line 47

def add(service)
  @services[service.name] = service
  self
end

#find(name) ⇒ Object



41
42
43
44
45
# File 'lib/construqt/services.rb', line 41

def find(name)
  found = @services[name]
  throw "service with name #{name} not found" unless found
  found
end