Class: Evilution::Integration::RSpec::StateGuard::WorldSourcesByPath Private

Inherits:
Object
  • Object
show all
Defined in:
lib/evilution/integration/rspec/state_guard/world_sources_by_path.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#release(before) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



12
13
14
15
16
17
18
19
# File 'lib/evilution/integration/rspec/state_guard/world_sources_by_path.rb', line 12

def release(before)
  return unless before

  src = Evilution::Integration::RSpec::StateGuard::Internals.world_ivar(:@sources_by_path)
  return unless src

  src.delete_if { |k, _v| !before.include?(k) }
end

#snapshotObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



7
8
9
10
# File 'lib/evilution/integration/rspec/state_guard/world_sources_by_path.rb', line 7

def snapshot
  src = Evilution::Integration::RSpec::StateGuard::Internals.world_ivar(:@sources_by_path)
  src ? Set.new(src.keys) : nil
end