Method: Reight::History#disable

Defined in:
lib/reight/history.rb

#disable(&block) ⇒ Object



61
62
63
64
65
66
67
68
69
70
71
# File 'lib/reight/history.rb', line 61

def disable(&block)
  old = enabled?
  enable false
  if block
    begin
      block.call
    ensure
      enable old
    end
  end
end