Module: Sheetah::Sheet::ClassMethods

Defined in:
lib/sheetah/sheet.rb

Instance Method Summary collapse

Instance Method Details

#open(*args, **opts) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/sheetah/sheet.rb', line 23

def open(*args, **opts)
  handle_sheet_error do
    sheet = new(*args, **opts)
    next sheet unless block_given?

    begin
      yield sheet
    ensure
      sheet.close
    end
  end
end