Working out cross-reference conventions
parent
fa10c82ee8
commit
0b63af6ba3
|
|
@ -1,5 +1,13 @@
|
|||
Specifying Ranges
|
||||
=================
|
||||
Squib Thinks in Arrays
|
||||
======================
|
||||
|
||||
|
||||
.. _using_ranges:
|
||||
|
||||
Using ``range``
|
||||
---------------
|
||||
|
||||
There's another way to limit a method to certain cards: the ``range`` parameter.
|
||||
|
||||
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.
|
||||
|
||||
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
import sys
|
||||
import os
|
||||
import sphinx_rtd_theme
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
|
|
@ -92,6 +93,7 @@ exclude_patterns = ['_build']
|
|||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
highlight_language = 'ruby'
|
||||
|
||||
# A list of ignored prefixes for module index sorting.
|
||||
#modindex_common_prefix = []
|
||||
|
|
@ -107,7 +109,7 @@ todo_include_todos = False
|
|||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
html_theme = 'default'
|
||||
html_theme = 'sphinx_rtd_theme' # https://github.com/snide/sphinx_rtd_theme
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
|
|
@ -115,7 +117,7 @@ html_theme = 'default'
|
|||
#html_theme_options = {}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
#html_theme_path = []
|
||||
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
|
|
|
|||
|
|
@ -8,12 +8,14 @@ Support Arrays, see {file:README.md#Arrays_and_Singleton_Expansion Arrays and Si
|
|||
Options
|
||||
^^^^^^^
|
||||
range
|
||||
default: *:all*
|
||||
default: ``:all``
|
||||
|
||||
the range of cards over which this will be rendered. See :doc:`range`
|
||||
the range of cards over which this will be rendered. See :ref:`using_ranges`
|
||||
|
||||
color
|
||||
[String] (:black) the color the font will render to. See {file:README.md#Specifying_Colors___Gradients Specifying Colors & Gradients}.
|
||||
default: ``:black`` . See :doc:`/colors`
|
||||
|
||||
the color to fill the background with.
|
||||
|
||||
|
||||
Examples
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
DSL Reference
|
||||
===========
|
||||
=============
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Contents:
|
|||
|
||||
learning
|
||||
parameters
|
||||
range
|
||||
arrays
|
||||
units
|
||||
colors
|
||||
dsl/index.rst
|
||||
|
|
@ -19,5 +19,4 @@ Indices and tables
|
|||
==================
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
* :ref:`search`
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ Squib is all about sane defaults and shorthand specification. Arguments to DSL m
|
|||
|
||||
For example `x` and `y` default to 0 (i.e. the upper-left corner of the card). Any parameter that is specified in the command overrides any Squib defaults, `config.yml` settings, or layout rules.
|
||||
|
||||
.. highlight:: none
|
||||
|
||||
Note: you MUST use named parameters rather than positional parameters. For example: ``save :png`` will lead to an error like this::
|
||||
|
||||
C:/Ruby200/lib/ruby/gems/2.0.0/gems/squib-0.0.3/lib/squib/api/save.rb:12:in `save': wrong number of arguments (2 for 0..1) (ArgumentError)
|
||||
|
|
|
|||
Loading…
Reference in New Issue