Class: AllMyCircuits::Strategies::AbstractWindowStrategy
- Inherits:
-
AbstractStrategy
show all
- Defined in:
- lib/all_my_circuits/strategies/abstract_window_strategy.rb,
lib/all_my_circuits/strategies/abstract_window_strategy/window.rb
Defined Under Namespace
Classes: Window
Instance Method Summary
collapse
Constructor Details
Returns a new instance of AbstractWindowStrategy.
7
8
9
10
|
# File 'lib/all_my_circuits/strategies/abstract_window_strategy.rb', line 7
def initialize(requests_window:)
@requests_window = requests_window
@window = Window.new(@requests_window)
end
|
Instance Method Details
#closed ⇒ Object
23
24
25
|
# File 'lib/all_my_circuits/strategies/abstract_window_strategy.rb', line 23
def closed
@window.reset!
end
|
#error ⇒ Object
16
17
18
|
# File 'lib/all_my_circuits/strategies/abstract_window_strategy.rb', line 16
def error
@window << :failed
end
|
#opened ⇒ Object
20
21
|
# File 'lib/all_my_circuits/strategies/abstract_window_strategy.rb', line 20
def opened
end
|
#should_open? ⇒ Boolean
27
28
29
|
# File 'lib/all_my_circuits/strategies/abstract_window_strategy.rb', line 27
def should_open?
raise NotImplementedError
end
|
#success ⇒ Object
12
13
14
|
# File 'lib/all_my_circuits/strategies/abstract_window_strategy.rb', line 12
def success
@window << :succeeded
end
|