Module: DInstaller::DBus::WithServiceStatus
- Included in:
- Manager, Software::Manager, Storage::Proposal, Users
- Defined in:
- lib/dinstaller/dbus/with_service_status.rb
Overview
Mixin to be included by D-Bus objects that needs to register a service status
Instance Method Summary collapse
-
#busy_while(&block) ⇒ Object
Sets the service status to busy meanwhile the given block is running.
-
#service_status ⇒ ServiceStatus
Service status.
Instance Method Details
#busy_while(&block) ⇒ Object
Sets the service status to busy meanwhile the given block is running
39 40 41 42 43 44 45 |
# File 'lib/dinstaller/dbus/with_service_status.rb', line 39 def busy_while(&block) service_status.busy result = block.call service_status.idle result end |
#service_status ⇒ ServiceStatus
Service status
31 32 33 |
# File 'lib/dinstaller/dbus/with_service_status.rb', line 31 def service_status @service_status ||= ServiceStatus.new.idle end |