Class: LeastUsedNode
- Inherits:
-
Object
- Object
- LeastUsedNode
- Defined in:
- app/services/least_used_node.rb
Instance Attribute Summary collapse
-
#execution_type ⇒ Object
readonly
Returns the value of attribute execution_type.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(execution_type:) ⇒ LeastUsedNode
constructor
A new instance of LeastUsedNode.
Constructor Details
#initialize(execution_type:) ⇒ LeastUsedNode
Returns a new instance of LeastUsedNode.
6 7 8 |
# File 'app/services/least_used_node.rb', line 6 def initialize(execution_type:) @execution_type = execution_type end |
Instance Attribute Details
#execution_type ⇒ Object (readonly)
Returns the value of attribute execution_type.
4 5 6 |
# File 'app/services/least_used_node.rb', line 4 def execution_type @execution_type end |
Instance Method Details
#call ⇒ Object
10 11 12 |
# File 'app/services/least_used_node.rb', line 10 def call least_used_nodes&.sample end |