Skip to content
Andy Meneely edited this page Nov 5, 2015 · 3 revisions

All Squib methods have two very important properties

  • Everything is optional, i.e. everything has a default value if not specified.
  • Defaults are as sane as we can make them.

For example, this is totally valid Squib code:

require 'squib'

Squib::Deck.new do 
  rect
  text
  save_png
end

To see the output of this, go check out the Sane Defaults gist

The defaults I chose for those are:

  • rect will draw a rectangle around the edges of the deck
  • text will render "Hello, World" in Arial 36 font, in the upper-left corner, left-aligned.
  • save_png will render the card to the _output folder

Also: Squib's deck by default renders to 825x1125 - also known as TheGameCrafter's Poker Deck template. This is based on a 2.5 x 3.5 inch standard card, with a 1/8 inch bleed.

That being said, defaults are great for getting going, but you'll ultimately want to customize. Eventually, you'll want to explore the options in the method-by-method docs

Clone this wiki locally