$ command line cheat sheets
Cheat Sheet Title: [ no_spaces_alphanumeric_only ]
Cheat Sheet:INTRODUCTION ERB provides an easy to use but powerful templating system for Ruby. Rails/RoR, the web application framework, uses ERB to create views. EDITORIAL NOTE: Shamelessly compiled and copied from: http://ruby-doc.org/stdlib/libdoc/erb/rdoc/classes/ERB.html RECOGNIZED TAGS ERB recognizes certain tags in the provided template and converts them based on the rules below: <% Ruby code -- inline with output %> <%= Ruby expression -- replace with result %> <%# comment -- ignored -- useful in testing %> % a line of Ruby code -- treated as <% line %> (optional -- see ERB.new) %% replaced with % if first thing on a line and % processing is used <%% or %%> -- replace with <% or %> respectively <%- and -%> suppress leading and trailing whitespace, including the trailing newline, and can be used interchangeably with <% and %>. All other text is passed through ERB filtering unchanged. ALTERNATIVES There are a variety of templating solutions available in various Ruby projects: * ERB‘s big brother, eRuby, works the same but is written in C for speed; * Erubis is a fast, secure, and very extensible implementation of eRuby * Amrita (smart at producing HTML/XML); * cs/Template (written in C for speed); * RDoc uses its own template engine, which can be reused elsewhere; * and others; search the RAA.
Your cheat sheet will be editable (fixable) by anyone. Each cheat sheet is essentially a wiki page. It may also be used by millions of people for reference purposes from the comfort of their command line. If this is okay with you, please save.