Class: TTCluster::Runner
- Inherits:
-
Object
- Object
- TTCluster::Runner
- Defined in:
- lib/ttcluster/runner.rb
Overview
‘ttcluster’ script runner.
Instance Attribute Summary collapse
-
#ttbase ⇒ Object
readonly
Returns the value of attribute ttbase.
Class Method Summary collapse
-
.run ⇒ Object
Wrapper of TTCluster::Runner#new.
Instance Method Summary collapse
-
#initialize ⇒ Runner
constructor
‘ttcluster’ script implementation.
Constructor Details
#initialize ⇒ Runner
‘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 = 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
#ttbase ⇒ Object (readonly)
Returns the value of attribute ttbase.
18 19 20 |
# File 'lib/ttcluster/runner.rb', line 18 def ttbase @ttbase end |
Class Method Details
.run ⇒ Object
Wrapper of TTCluster::Runner#new.
22 23 24 |
# File 'lib/ttcluster/runner.rb', line 22 def self.run new end |