summaryrefslogtreecommitdiffstats
path: root/tests/roots/test-directive-code/namedblocks.rst
blob: 5779bc97284b6a033ac70886f10111ece2a1c4a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Named Blocks
============

References to named blocks
--------------------------

See :ref:`the ruby code <some ruby code>` and
also :ref:`the python code <some python code>`.


Named Code block
----------------

.. code-block:: ruby
   :name: some ruby code

   def ruby?
       false
   end


Named Literal Include
---------------------

.. literalinclude:: literal.inc
   :language: python
   :name: some python code