Class: Opswatch::Main

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMain

Returns a new instance of Main.



11
12
13
14
15
16
17
18
19
# File 'lib/opswatch.rb', line 11

def initialize
  settings = Configuration.load_file(".opswatch.yml")
  @groups = {}
  settings.each do |k, v|
    @groups[k] = { tray: OpsTray.new(k, IconPack.new(k)), poller: AwsPoller.new(v) }
  end

  Gtk.timeout_add(5000) { poll }
end

Class Method Details

.start(_argv = nil) ⇒ Object



21
22
23
24
25
# File 'lib/opswatch.rb', line 21

def self.start(_argv = nil)
  @instance = new

  Gtk.main
end