Starting to port docs over to rtd

dev
Andy Meneely 2016-01-24 00:31:33 -05:00
parent 1dea55e5d0
commit dcf838b500
4 changed files with 66 additions and 2 deletions

20
docs/dsl/background.rst Normal file
View File

@ -0,0 +1,20 @@
background
----------
Fills the background with the given color
Support Arrays, see {file:README.md#Arrays_and_Singleton_Expansion Arrays and Singleon Expansion}
Options
^^^^^^^
range
default: *:all*
the range of cards over which this will be rendered. See :doc:`range`
color
[String] (:black) the color the font will render to. See {file:README.md#Specifying_Colors___Gradients Specifying Colors & Gradients}.
Examples
^^^^^^^^

37
docs/dsl/index.rst Normal file
View File

@ -0,0 +1,37 @@
DSL Reference
===========
.. toctree::
:maxdepth: 1
:glob:
*
background
circle
cm
csv
curve
ellipse
grid
hand
hint
inches
initialize
line
png
png
polygon
rect
save
save_pdf
save_png
save_sheet
set
showcase
star
stroke_outline
svg
text
triangle
xlsx

View File

@ -7,9 +7,10 @@ Contents:
.. toctree::
:maxdepth: 1
:glob:
dsl/index.rst
units
dsl/*
range
Indices and tables
==================

6
docs/range.rst Normal file
View File

@ -0,0 +1,6 @@
Specifying Ranges
=================
Most of Squib's DSL methods allow a `range` to be specified as a first parameter. This parameter is used to access an internal `Array` of `Squib::Cards`. This can be an actual Ruby range, or anything that implements `#each` (thus can be an `Enumerable`). Integers are also supported for changing one card only. Negatives work from the back of the deck.
Here are some examples from `samples/ranges.rb` found [here](https://github.com/andymeneely/squib/tree/master/samples/ranges.rb)