Class: HeartTop::Agent
- Inherits:
-
Object
- Object
- HeartTop::Agent
- Defined in:
- lib/heart_top/agent.rb
Constant Summary collapse
- PLUGINS =
%i[slack].freeze
Instance Method Summary collapse
-
#initialize(interval:, verbose:) ⇒ Agent
constructor
A new instance of Agent.
- #run ⇒ Object
Constructor Details
#initialize(interval:, verbose:) ⇒ Agent
Returns a new instance of Agent.
9 10 11 12 |
# File 'lib/heart_top/agent.rb', line 9 def initialize(interval:, verbose:) @interval = interval @verbose = verbose end |
Instance Method Details
#run ⇒ Object
14 15 16 17 18 19 |
# File 'lib/heart_top/agent.rb', line 14 def run loop do execute_plugins sleep @interval end end |