Class: Amigo::Autoscaler::Handlers::Chain

Inherits:
Amigo::Autoscaler::Handler show all
Defined in:
lib/amigo/autoscaler/handlers/chain.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(chain) ⇒ Chain

Chain multiple handlers together.

Parameters:



13
14
15
16
# File 'lib/amigo/autoscaler/handlers/chain.rb', line 13

def initialize(chain)
  @chain = chain
  super()
end

Instance Attribute Details

#chainObject

Returns the value of attribute chain.



9
10
11
# File 'lib/amigo/autoscaler/handlers/chain.rb', line 9

def chain
  @chain
end

Instance Method Details

#scale_down(**kw) ⇒ Object



22
23
24
# File 'lib/amigo/autoscaler/handlers/chain.rb', line 22

def scale_down(**kw)
  @chain.each { |c| c.scale_down(**kw) }
end

#scale_up(**kw) ⇒ Object



18
19
20
# File 'lib/amigo/autoscaler/handlers/chain.rb', line 18

def scale_up(**kw)
  @chain.each { |c| c.scale_up(**kw) }
end