diff --git a/docs/dsl/background.rst b/docs/dsl/background.rst new file mode 100644 index 0000000..a6721e0 --- /dev/null +++ b/docs/dsl/background.rst @@ -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 +^^^^^^^^ diff --git a/docs/dsl/index.rst b/docs/dsl/index.rst new file mode 100644 index 0000000..16e81b5 --- /dev/null +++ b/docs/dsl/index.rst @@ -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 diff --git a/docs/index.rst b/docs/index.rst index 2892397..32e708d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -7,9 +7,10 @@ Contents: .. toctree:: :maxdepth: 1 :glob: - + + dsl/index.rst units - dsl/* + range Indices and tables ================== diff --git a/docs/range.rst b/docs/range.rst new file mode 100644 index 0000000..3abeebb --- /dev/null +++ b/docs/range.rst @@ -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)