Tons of documentation work
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user