Class: ConfCtl::HealthChecks::Systemd::PropertyCheck
- Inherits:
-
Object
- Object
- ConfCtl::HealthChecks::Systemd::PropertyCheck
- Defined in:
- lib/confctl/health_checks/systemd/property_check.rb
Instance Attribute Summary collapse
- #cooldown ⇒ Integer readonly
- #property ⇒ String readonly
- #timeout ⇒ Integer readonly
- #value ⇒ String readonly
Instance Method Summary collapse
- #check(v) ⇒ Boolean
-
#initialize(opts) ⇒ PropertyCheck
constructor
A new instance of PropertyCheck.
- #to_s ⇒ Object
Constructor Details
#initialize(opts) ⇒ PropertyCheck
Returns a new instance of PropertyCheck.
15 16 17 18 19 20 |
# File 'lib/confctl/health_checks/systemd/property_check.rb', line 15 def initialize(opts) @property = opts['property'] @value = opts['value'] @timeout = opts['timeout'] @cooldown = opts['cooldown'] end |
Instance Attribute Details
#cooldown ⇒ Integer (readonly)
13 14 15 |
# File 'lib/confctl/health_checks/systemd/property_check.rb', line 13 def cooldown @cooldown end |
#property ⇒ String (readonly)
4 5 6 |
# File 'lib/confctl/health_checks/systemd/property_check.rb', line 4 def property @property end |
#timeout ⇒ Integer (readonly)
10 11 12 |
# File 'lib/confctl/health_checks/systemd/property_check.rb', line 10 def timeout @timeout end |
#value ⇒ String (readonly)
7 8 9 |
# File 'lib/confctl/health_checks/systemd/property_check.rb', line 7 def value @value end |
Instance Method Details
#check(v) ⇒ Boolean
23 24 25 |
# File 'lib/confctl/health_checks/systemd/property_check.rb', line 23 def check(v) @value == v end |
#to_s ⇒ Object
27 28 29 |
# File 'lib/confctl/health_checks/systemd/property_check.rb', line 27 def to_s "#{property}=#{value}" end |