class ForemanMaintain::Utils::Service::Abstract
Attributes
name[R]
priority[R]
Public Class Methods
new(name, priority, options = {})
click to toggle source
# File lib/foreman_maintain/utils/service/abstract.rb, line 7 def initialize(name, priority, options = {}) @name = name @priority = priority @options = options end
Public Instance Methods
<=>(other)
click to toggle source
# File lib/foreman_maintain/utils/service/abstract.rb, line 13 def <=>(other) prio_cmp = @priority <=> other.priority prio_cmp == 0 ? @name <=> other.name : prio_cmp end
disable()
click to toggle source
# File lib/foreman_maintain/utils/service/abstract.rb, line 56 def disable raise NotImplementedError end
enable()
click to toggle source
# File lib/foreman_maintain/utils/service/abstract.rb, line 52 def enable raise NotImplementedError end
exist?()
click to toggle source
# File lib/foreman_maintain/utils/service/abstract.rb, line 36 def exist? raise NotImplementedError end
inspect()
click to toggle source
# File lib/foreman_maintain/utils/service/abstract.rb, line 22 def inspect "#{self.class.name.split('::').last}(#{@name} [#{@priority}])" end
matches?(service)
click to toggle source
# File lib/foreman_maintain/utils/service/abstract.rb, line 26 def matches?(service) if service.is_a? String service == @name elsif service.instance_of?(self.class) service.name == @name else false end end
running?()
click to toggle source
# File lib/foreman_maintain/utils/service/abstract.rb, line 60 def running? raise NotImplementedError end
start()
click to toggle source
# File lib/foreman_maintain/utils/service/abstract.rb, line 44 def start raise NotImplementedError end
status()
click to toggle source
# File lib/foreman_maintain/utils/service/abstract.rb, line 40 def status raise NotImplementedError end
stop()
click to toggle source
# File lib/foreman_maintain/utils/service/abstract.rb, line 48 def stop raise NotImplementedError end
to_s()
click to toggle source
# File lib/foreman_maintain/utils/service/abstract.rb, line 18 def to_s @name end