Class: PostRunner::Main

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

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Main

Returns a new instance of Main.



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/postrunner/Main.rb', line 28

def initialize(args)
  @filter = nil
  @name = nil
  @attribute = nil
  @value = nil
  @activities = nil
  @monitoring = nil
  @db_dir = File.join(ENV['HOME'], '.postrunner')

  return if (args = parse_options(args)).nil?

  @cfg = RuntimeConfig.new(@db_dir)
  @db = PEROBS::Store.new(File.join(@db_dir, 'database'))
  execute_command(args)
end