Class: TTCluster::Runner

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

Overview

‘ttcluster’ script runner.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRunner

‘ttcluster’ script implementation.



28
29
30
31
32
33
34
35
36
# File 'lib/ttcluster/runner.rb', line 28

def initialize
  init_ttbase
  init_user
  cmd = parse_options
  switch_user
  kls = TTCluster.const_get("#{cmd.capitalize}Command")
  arg = cmd == "setup" ? ARGV[1,2] : ["#{ARGV[1]||'all'}"]
  kls.new(self, *arg).run
end

Instance Attribute Details

#ttbaseObject (readonly)

Returns the value of attribute ttbase.



18
19
20
# File 'lib/ttcluster/runner.rb', line 18

def ttbase
  @ttbase
end

Class Method Details

.runObject

Wrapper of TTCluster::Runner#new.



22
23
24
# File 'lib/ttcluster/runner.rb', line 22

def self.run
  new
end