Module: Construqt::Flavour::Ubuntu::Services
- Defined in:
- lib/construqt/flavour/ubuntu/flavour_ubuntu_services.rb
Defined Under Namespace
Classes: ConntrackD, DhcpV4Relay, DhcpV6Relay, Radvd, RouteService
Class Method Summary collapse
Class Method Details
.get_renderer(service) ⇒ Object
183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/construqt/flavour/ubuntu/flavour_ubuntu_services.rb', line 183 def self.get_renderer(service) factory = { Construqt::Services::DhcpV4Relay => DhcpV4Relay, Construqt::Services::DhcpV6Relay => DhcpV6Relay, Construqt::Services::Radvd => Radvd, Construqt::Services::ConntrackD => ConntrackD, Construqt::Flavour::Ubuntu::Vrrp::RouteService => RouteService } found = factory.keys.find{ |i| service.kind_of?(i) } throw "service type unknown #{service.name} #{service.class.name}" unless found factory[found].new(service) end |