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.
5 6 7 8 |
# File 'lib/autoscaler/stub_scaler.rb', line 5 def initialize(type = 'worker') @type = type @workers = 0 end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
10 11 12 |
# File 'lib/autoscaler/stub_scaler.rb', line 10 def type @type end |
#workers ⇒ Numeric
Read the current worker count
14 15 16 |
# File 'lib/autoscaler/stub_scaler.rb', line 14 def workers @workers end |