Class: StandardHealth::EnvSpec::Entry
- Inherits:
-
Struct
- Object
- Struct
- StandardHealth::EnvSpec::Entry
- Defined in:
- lib/standard_health/env_spec.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#level ⇒ Object
Returns the value of attribute level.
-
#modes ⇒ Object
Returns the value of attribute modes.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#applies_to?(mode) ⇒ Boolean
Whether this entry’s audit applies under the given runtime mode.
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description
23 24 25 |
# File 'lib/standard_health/env_spec.rb', line 23 def description @description end |
#level ⇒ Object
Returns the value of attribute level
23 24 25 |
# File 'lib/standard_health/env_spec.rb', line 23 def level @level end |
#modes ⇒ Object
Returns the value of attribute modes
23 24 25 |
# File 'lib/standard_health/env_spec.rb', line 23 def modes @modes end |
#name ⇒ Object
Returns the value of attribute name
23 24 25 |
# File 'lib/standard_health/env_spec.rb', line 23 def name @name end |
Instance Method Details
#applies_to?(mode) ⇒ Boolean
Whether this entry’s audit applies under the given runtime mode. Entries without a ‘modes:` constraint always apply.
26 27 28 29 |
# File 'lib/standard_health/env_spec.rb', line 26 def applies_to?(mode) return true if modes.nil? || modes.empty? modes.include?(mode.to_s) end |