Class: HeartTop::Agent

Inherits:
Object
  • Object
show all
Defined in:
lib/heart_top/agent.rb

Constant Summary collapse

PLUGINS =
%i[slack].freeze

Instance Method Summary collapse

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

#runObject



14
15
16
17
18
19
# File 'lib/heart_top/agent.rb', line 14

def run
  loop do
    execute_plugins
    sleep @interval
  end
end