Starting work on the new options

This commit is contained in:
Andy Meneely
2014-07-25 13:10:04 -04:00
parent a017330d0b
commit 6c60476e42
9 changed files with 97 additions and 75 deletions
+2 -1
View File
@@ -15,7 +15,8 @@ module Squib
# @param file: [String] the file to open. Must end in `.xlsx`. Opens relative to the current directory.
# @param sheet: [Integer] The zero-based index of the sheet from which to read.
# @api public
def xlsx(file: 'deck.xlsx', sheet: 0)
def xlsx(opts = {})
needs(opts, [:file, :sheet])
s = Roo::Excelx.new(file)
s.default_sheet = s.sheets[sheet]
data = {}