Sha256: 657ee20cef31f7d40421b115a050c5242948f058d182ad78d523696eb63f8a6d
Contents?: true
Size: 612 Bytes
Versions: 7
Compression:
Stored size: 612 Bytes
Contents
require 'squib' Squib::Deck.new(cards: 2) do background color: :white # Outputs a hash of arrays with the header names as keys data = csv file: 'sample.csv' text str: data['Name'], x: 250, y: 55, font: 'Arial 54' text str: data['Level'], x: 65, y: 65, font: 'Arial 72' text str: data['Description'], x: 65, y: 600, font: 'Arial 36' # You can also specify the sheet, starting at 0 data = xlsx file: 'sample.xlsx', sheet: 2 save format: :png, prefix: 'sample_csv_' end # CSV is also a Squib-module-level function, so this also works: data = Squib.csv file: 'sample.csv'
Version data entries
7 entries across 7 versions & 1 rubygems