Lisp::Format

"So what is *ruby-lisp*?", you ask. Well, it is a module for implementing nice Lisp features for use in Ruby. Currently the only sub-module that exists is Lisp::Format, which implements Lisp’s (format) function and its formatting language. For people not familiar with this language, it is a very expressive string formatting language, much like sprintf()’s, but much more powerful. It allows for iteration, case conversion, conditionals, and much more. If you have ever felt stupid while creating a string iteratively, to print an array or some such, this is definitely for you!

This module contains various Lisp facilities that are of general usefulness. Lisp’s rich string formatting language is implemented in the Format module. More modules may be added later.

This has been (very simply) integrated into the namespace of Lisp from lisp.rb.

This module implements the Common Lisp (format) function and it’s language.

Methods
Private Class methods
execute_directives(state, directives)

Execute a set of directives in a given state.

# File lib/facets/more/lisp_format.rb, line 1804
    def self.execute_directives(state, directives)
      directives.each do |directive|
        begin
          directive.execute state
        rescue => e
          e.pos = d.pos if e.respond_to?(:pos) and e.pos == -1
          raise
        end
      end
    end