Sha256: cc782db10cf77c29240f73a8edb42fa723923b8b02e33939cd5680de60ea2c6c

Contents?: true

Size: 552 Bytes

Versions: 2

Compression:

Stored size: 552 Bytes

Contents

module ConfCtl
  class HealthChecks::Systemd::PropertyCheck
    # @return [String]
    attr_reader :property

    # @return [String]
    attr_reader :value

    # @return [Integer]
    attr_reader :timeout

    # @return [Integer]
    attr_reader :cooldown

    def initialize(opts)
      @property = opts['property']
      @value = opts['value']
      @timeout = opts['timeout']
      @cooldown = opts['cooldown']
    end

    # @return [Boolean]
    def check(v)
      @value == v
    end

    def to_s
      "#{property}=#{value}"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
confctl-2.0.0 lib/confctl/health_checks/systemd/property_check.rb
confctl-1.0.0 lib/confctl/health_checks/systemd/property_check.rb