Class: ChefInstance::Service::Template
- Inherits:
-
Object
- Object
- ChefInstance::Service::Template
- Defined in:
- lib/chef_instance/service.rb
Overview
A Superclass template for service managers.
Instance Method Summary collapse
-
#create ⇒ Object
Create and place the service script.
-
#destroy ⇒ Object
Destroy the service script.
-
#disable ⇒ Object
If enabled, disable the service.
-
#enable ⇒ Object
Enable the service.
-
#initialize(new_resource, run_context = nil) ⇒ Template
constructor
Construct a new ChefInstance::Service::Template.
Constructor Details
#initialize(new_resource, run_context = nil) ⇒ Template
Construct a new ChefInstance::Service::Template.
8 9 10 11 |
# File 'lib/chef_instance/service.rb', line 8 def initialize(new_resource, run_context = nil) @new_resource = new_resource @run_context = run_context end |
Instance Method Details
#create ⇒ Object
Create and place the service script.
14 15 16 |
# File 'lib/chef_instance/service.rb', line 14 def create create_service_script end |
#destroy ⇒ Object
Destroy the service script.
19 20 21 |
# File 'lib/chef_instance/service.rb', line 19 def destroy destroy_service end |
#disable ⇒ Object
If enabled, disable the service.
24 25 26 |
# File 'lib/chef_instance/service.rb', line 24 def disable disable_service end |
#enable ⇒ Object
Enable the service.
29 30 31 |
# File 'lib/chef_instance/service.rb', line 29 def enable enable_service end |