From 27d3ca358e3d80aa4c8213308bd5a48c780cb522 Mon Sep 17 00:00:00 2001 From: Matt Garriott Date: Thu, 11 Dec 2014 10:17:54 -0700 Subject: [PATCH] Calling Roo::Base#sheet returns the specified sheet --- lib/roo/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/roo/base.rb b/lib/roo/base.rb index e6f3bddb..1d91d9cb 100644 --- a/lib/roo/base.rb +++ b/lib/roo/base.rb @@ -314,7 +314,7 @@ def method_missing(m, *args) # access different worksheets by calling spreadsheet.sheet(1) # or spreadsheet.sheet('SHEETNAME') def sheet(index, name = false) - default_sheet = String === index ? index : sheets[index] + self.default_sheet = String === index ? index : sheets[index] name ? [default_sheet, self] : self end