Class: Yast::ServicesProposalClass
- Inherits:
-
Module
- Object
- Module
- Yast::ServicesProposalClass
- Includes:
- Logger
- Defined in:
- library/systemd/src/modules/ServicesProposal.rb
Instance Method Summary collapse
-
#disable_service(service) ⇒ Object
Marks the given service as disabled.
-
#disabled_services ⇒ Array <String>
Returns all services currently marked as disabled.
-
#enable_service(service) ⇒ Object
Marks the given service as enabled.
-
#enabled_services ⇒ Array <String>
Returns all services currently marked as enabled.
-
#initialize ⇒ ServicesProposalClass
constructor
A new instance of ServicesProposalClass.
- #reset ⇒ Object
Constructor Details
#initialize ⇒ ServicesProposalClass
Returns a new instance of ServicesProposalClass.
36 37 38 39 40 |
# File 'library/systemd/src/modules/ServicesProposal.rb', line 36 def initialize super @services = {} end |
Instance Method Details
#disable_service(service) ⇒ Object
Marks the given service as disabled
57 58 59 60 |
# File 'library/systemd/src/modules/ServicesProposal.rb', line 57 def disable_service(service) check_service(service) @services[service] = :disabled end |
#disabled_services ⇒ Array <String>
Returns all services currently marked as disabled
72 73 74 |
# File 'library/systemd/src/modules/ServicesProposal.rb', line 72 def disabled_services @services.select { |_service, status| status == :disabled }.keys end |
#enable_service(service) ⇒ Object
Marks the given service as enabled
49 50 51 52 |
# File 'library/systemd/src/modules/ServicesProposal.rb', line 49 def enable_service(service) check_service(service) @services[service] = :enabled end |
#enabled_services ⇒ Array <String>
Returns all services currently marked as enabled
65 66 67 |
# File 'library/systemd/src/modules/ServicesProposal.rb', line 65 def enabled_services @services.select { |_service, status| status == :enabled }.keys end |
#reset ⇒ Object
42 43 44 |
# File 'library/systemd/src/modules/ServicesProposal.rb', line 42 def reset @services = {} end |