From 1cd168c9986a892c1b7d3462d1e5c0a07b944804 Mon Sep 17 00:00:00 2001 From: Andy Meneely Date: Tue, 15 Nov 2016 15:01:43 -0500 Subject: [PATCH] docs: include code snippet for units --- docs/units.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/units.rst b/docs/units.rst index f0a78dc..a17acbb 100644 --- a/docs/units.rst +++ b/docs/units.rst @@ -3,4 +3,8 @@ Unit Conversion By default, Squib thinks in pixels. This decision was made so that we can have pixel-perfect layouts without automatically scaling everything, even though working in units is sometimes easier. We provide some conversion methods, including looking for strings that end in "in", "cm", or "mm" and computing based on the current DPI. The dpi is set on `Squib::Deck.new` (not `config.yml`). -Example is in `samples/units.rb` found [here](https://github.com/andymeneely/squib/tree/master/samples/units.rb) +Here are some examples, which `lives here `_ + +.. literalinclude:: ../samples/units.rb + :language: ruby + :linenos: