Tons of documentation work

This commit is contained in:
Andy Meneely
2014-07-21 17:02:34 -04:00
parent 209b4240eb
commit d34e4729ce
21 changed files with 292 additions and 48 deletions
+8
View File
@@ -3,10 +3,18 @@ require 'roo'
module Squib
class Deck
#@api private todo
def csv(file: 'deck.csv', header: true)
raise 'Not implemented!'
end
# Convenience method for pulling Excel data from `.xlsx` files
# Pulls the data into a Hash of arrays based on the columns. First row is assumed to be the header row.
# See the example at {file:samples/excel.rb samples/excel.rb}. The accompanying Excel file is in the [source repository](https://github.com/andymeneely/squib/tree/master/samples)
#
# @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)
s = Roo::Excelx.new(file)
s.default_sheet = s.sheets[sheet]