Class: Check
- Inherits:
-
Object
- Object
- Check
- Defined in:
- lib/audit/lib/benchmark/check.rb
Instance Attribute Summary collapse
-
#dependencies ⇒ Object
readonly
An array if ID string, which contain references to required Check (not Group!).
-
#description ⇒ Object
readonly
A short description of the goals of this check.
-
#duration ⇒ Object
readonly
objects that must be executed before this check.
-
#id ⇒ Object
readonly
The ID by which this check is referenced from other elements.
-
#name ⇒ Object
readonly
A human-readable name for this check.
-
#script ⇒ Object
readonly
The actual sh script that will be executed to gather values.
Instance Method Summary collapse
- #in_report? ⇒ Boolean
-
#initialize(id, script, name = nil, dependencies = [], description = nil, duration = 1) ⇒ Check
constructor
A new instance of Check.
- #to_hash ⇒ Object
Constructor Details
#initialize(id, script, name = nil, dependencies = [], description = nil, duration = 1) ⇒ Check
Returns a new instance of Check.
12 13 14 15 16 17 18 19 |
# File 'lib/audit/lib/benchmark/check.rb', line 12 def initialize(id, script, name = nil, dependencies = [], description = nil, duration = 1) @id = id @name = name @dependencies = dependencies || [] @description = description @script = script @duration = (duration or 1) end |
Instance Attribute Details
#dependencies ⇒ Object (readonly)
An array if ID string, which contain references to required Check (not Group!)
8 9 10 |
# File 'lib/audit/lib/benchmark/check.rb', line 8 def dependencies @dependencies end |
#description ⇒ Object (readonly)
A short description of the goals of this check
6 7 8 |
# File 'lib/audit/lib/benchmark/check.rb', line 6 def description @description end |
#duration ⇒ Object (readonly)
objects that must be executed before this check
10 11 12 |
# File 'lib/audit/lib/benchmark/check.rb', line 10 def duration @duration end |
#id ⇒ Object (readonly)
The ID by which this check is referenced from other elements
4 5 6 |
# File 'lib/audit/lib/benchmark/check.rb', line 4 def id @id end |
#name ⇒ Object (readonly)
A human-readable name for this check
5 6 7 |
# File 'lib/audit/lib/benchmark/check.rb', line 5 def name @name end |
#script ⇒ Object (readonly)
The actual sh script that will be executed to gather values
7 8 9 |
# File 'lib/audit/lib/benchmark/check.rb', line 7 def script @script end |
Instance Method Details
#in_report? ⇒ Boolean
31 32 33 |
# File 'lib/audit/lib/benchmark/check.rb', line 31 def in_report?() return true end |