Module: FakeFS::Magick::FakeFSHook

Defined in:
lib/fakefs/rmagick/fakefs_hook.rb

Instance Method Summary collapse

Instance Method Details

#activate!Object



5
6
7
8
# File 'lib/fakefs/rmagick/fakefs_hook.rb', line 5

def activate!
  FakeFS::Magick.activate! if with_rmagick_hook?
  super
end

#deactivate!Object



10
11
12
13
# File 'lib/fakefs/rmagick/fakefs_hook.rb', line 10

def deactivate!
  super
  FakeFS::Magick.deactivate! if with_rmagick_hook?
end

#with_rmagick_hook?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/fakefs/rmagick/fakefs_hook.rb', line 15

def with_rmagick_hook?
  FakeFS::Magick.hook_activated?
end