mirror of
https://github.com/inspec/inspec
synced 2024-11-27 07:00:39 +00:00
rename service_info to info
This commit is contained in:
parent
9a6063c267
commit
9aa0b1cf4a
1 changed files with 4 additions and 4 deletions
|
@ -24,23 +24,23 @@ class Service < Vulcano.resource(1)
|
|||
fail 'The `service` resource is not supported on your OS yet. Please open an issue on Github.' if @service_mgmt.nil?
|
||||
end
|
||||
|
||||
def service_info
|
||||
def info
|
||||
@service_mgmt.info(@service_name)
|
||||
end
|
||||
|
||||
# verifies the service is enabled
|
||||
def enabled?(_level = nil)
|
||||
service_info[:enabled]
|
||||
info[:enabled]
|
||||
end
|
||||
|
||||
# verifies the service is registered
|
||||
def installed?(_name = nil, _version = nil)
|
||||
!service_info.nil?
|
||||
!info.nil?
|
||||
end
|
||||
|
||||
# verifies the service is currently running
|
||||
def running?(_under = nil)
|
||||
service_info[:running]
|
||||
info[:running]
|
||||
end
|
||||
|
||||
def to_s
|
||||
|
|
Loading…
Reference in a new issue