Once the gem is installed, YARD should automatically load it.
Then any block of code beginning with
!!!lang that YARD doesn't recognize
will be highlighted using Pygments if possible.
Unless another highlighter is installed, in which case it might take precedence.
By default, YARD itself only recognizes Ruby. The full list of languages recognized by Pygments is available here. The names that will be recognized for these languages are listed under "short names".
!!!sh easy_install Pygments
Otherwise, it can be downloaded here.