From 04cf7d2c9c2dc34e5ef91fd2bc747aa825892c02 Mon Sep 17 00:00:00 2001 From: Adam Blinkinsop Date: Fri, 17 Mar 2017 11:52:32 -0700 Subject: [PATCH] Create _yaml.rb Next up, create sample.yaml --- samples/data/_yaml.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 samples/data/_yaml.rb diff --git a/samples/data/_yaml.rb b/samples/data/_yaml.rb new file mode 100644 index 0000000..39e7a78 --- /dev/null +++ b/samples/data/_yaml.rb @@ -0,0 +1,12 @@ +require 'squib' + +Squib::Deck.new(cards: 2) do + background color: :white + + # Outputs a hash of arrays with the header names as keys + data = yaml file: 'sample.yaml' + text str: data['Type'], x: 250, y: 55, font: 'Arial 54' + text str: data['Level'], x: 65, y: 65, font: 'Arial 72' + + save format: :png, prefix: 'sample_yaml_' +end