Class: ReactiveObservers::Observable::Removing
- Inherits:
-
Object
- Object
- ReactiveObservers::Observable::Removing
- Defined in:
- lib/reactive_observers/observable/removing.rb
Constant Summary collapse
- REQUIRED_FIELDS =
%i[klass object].freeze
Instance Method Summary collapse
-
#initialize(active_observers, observer, removing_options) ⇒ Removing
constructor
A new instance of Removing.
- #perform ⇒ Object
Constructor Details
#initialize(active_observers, observer, removing_options) ⇒ Removing
Returns a new instance of Removing.
8 9 10 11 12 |
# File 'lib/reactive_observers/observable/removing.rb', line 8 def initialize(active_observers, observer, ) @active_observers = active_observers @observer = observer @removing_options = end |
Instance Method Details
#perform ⇒ Object
14 15 16 17 18 |
# File 'lib/reactive_observers/observable/removing.rb', line 14 def perform @active_observers.delete_if do |active_observer| active_observer.compare.partial? @observer, @removing_options end end |