Class: Autoscaler::StubScaler
- Inherits:
-
Object
- Object
- Autoscaler::StubScaler
- Defined in:
- lib/autoscaler/stub_scaler.rb
Overview
A minimal scaler to use as stub for local testing
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#workers ⇒ Numeric
Read the current worker count.
Instance Method Summary collapse
-
#initialize(type = 'worker') ⇒ StubScaler
constructor
A new instance of StubScaler.
Constructor Details
#initialize(type = 'worker') ⇒ StubScaler
Returns a new instance of StubScaler.
7 8 9 10 |
# File 'lib/autoscaler/stub_scaler.rb', line 7 def initialize(type = 'worker') @type = type @workers = 0 end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
12 13 14 |
# File 'lib/autoscaler/stub_scaler.rb', line 12 def type @type end |
#workers ⇒ Numeric
Read the current worker count
16 17 18 |
# File 'lib/autoscaler/stub_scaler.rb', line 16 def workers @workers end |