<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>README.rdoc</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -16,7 +16,7 @@ desc 'Generate documentation for the action_sequence plugin.'
 Rake::RDocTask.new(:rdoc) do |rdoc|
   rdoc.rdoc_dir = 'rdoc'
   rdoc.title    = 'ActionSequence'
-  rdoc.options &lt;&lt; '--line-numbers' &lt;&lt; '--inline-source'
-  rdoc.rdoc_files.include('README')
+  rdoc.options &lt;&lt; '--line-numbers' &lt;&lt; '--inline-source' &lt;&lt; '--charset=UTF-8'
+  rdoc.rdoc_files.include('README.rdoc')
   rdoc.rdoc_files.include('lib/**/*.rb')
 end</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -1,12 +1,13 @@
-# Author::      Florian A&#223;mann (flazy@fork.de)
-# Last Update:: 2008-07-12
-#
-# This class helps building multipage form.
+# Author:: Florian A&#223;mann
+
+# Storage for routing.
 class ActionSequence
-  VERSION = [1, 0, 1]
+  
+  VERSION = [1, 0, 2]
 
   attr_reader :steps_array, :steps_hash, :walker
 
+  # Stores walker parameter name and runs Initializer.
   def initialize(walker, &amp;init)
     @steps_array, @steps_hash = [], {}
     @walker = walker
@@ -17,16 +18,7 @@ class ActionSequence
     finalize!
   end
 
-  # Finalizes the sequence.
-  #
-  # Enqueues the :finished step unless it's already defined and freezes steps
-  # containers.
-  def finalize!
-    @steps_hash.has_key? :finished or self &lt;&lt; Step.new(:finished, proc {|w|})
-    [@steps_array, @steps_hash].each { |c| c.freeze }
-  end
-  protected :finalize!
-
+  # Adds a ActionSequence::Step to instance and sets the index.
   def &lt;&lt;(step)
     @steps_array &lt;&lt; step
     @steps_hash[step.name] = step
@@ -34,34 +26,31 @@ class ActionSequence
     step.set_index @steps_array.length
   end
 
+  # Returns the first ActionSequence::Step.
   def first
     @steps_array.first
   end
+  # Returns the last ActionSequence::Step.
   def last
     @steps_array.last
   end
 
-  # Returns true if the steps index equals the length of steps container.
+  # Returns true if the ActionSequence::Step is the last.
   def finished_with?(step)
     @steps_array.length == step.index
   end
 
-  # Walks the controller step.
+  # Invokes ActionSequence::Walker with self, controller and the named step.
   def walk(controller, step = nil)
     Walker.walk self, controller, @steps_hash[step]
   end
 
+  # Extends ActionController::Base.
   module ClassMethods
     # Creates a new sequence. This sequence is accessable through
     # :#{ name }_sequence and can be walked with :walk_#{ name }_sequence.
     #
-    # After walking a sequence the step returned by walked step or the walked
-    # step itself is returned.
-    #
-    # If the returned steps has requirements these are invoked before the step
-    # is returned.
-    #
-    # Requirements and steps are invoked in controller instance scope.
+    # See: Initializer, Walker
     def sequence(name, walker = :step, &amp;initialization)
       sequence = ActionSequence.new(walker, &amp;initialization)
 
@@ -69,7 +58,7 @@ class ActionSequence
         sequence
       end
       define_method &quot;walk_#{ name }_sequence&quot; do |*step|
-        instance_variable_set :&quot;@#{ walker }&quot;, if step = step.first
+        instance_variable_set &quot;@#{ walker }&quot;.to_sym, if step = step.first
           sequence.walk(self, step)
         else
           sequence.walk(self)
@@ -79,6 +68,16 @@ class ActionSequence
     end
   end
 
+  private
+  # Finalizes the sequence.
+  #
+  # Enqueues the :finished step unless it's already defined and freezes steps
+  # containers.
+  def finalize!
+    @steps_hash.has_key? :finished or self &lt;&lt; Step.new(:finished, proc {|w|})
+    [@steps_array, @steps_hash].each { |c| c.freeze }
+  end
+
 end
 
 require __FILE__.insert(-4, '/initializer')</diff>
      <filename>lib/action_sequence.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,14 +1,31 @@
-# Builder for ActionSequence::Step.
-class ActionSequence::Initializer
+# Author:: Florian A&#223;mann
+
+class ActionSequence
+  # ActionSequence::Initializer helps building the multipage form routing.
+  #
+  # Example
+  #
+  #   enter_stuff do |s|
+  #     if params[:back] then s.previous
+  #     elsif @item.valid_stuff? then s.next
+  #     end
+  #   end # =&gt; Step.new :enter_stuff, [], proc { ... }
+  #   select_other_stuff(:meth1, :meth2) do |s|
+  #     if params[:back] then s.previous
+  #     elsif @item.save then s[:finished]
+  #     end
+  #   end # =&gt; Step.new :select_other_stuff, [:meth1, :meth2], proc { ... }
+  class Initializer
   
-  alias_method :__eval__, :instance_eval
-  instance_methods.each { |meth| undef_method(meth) unless meth =~ /\A__/ }
+    alias_method :__eval__, :instance_eval
+    instance_methods.each { |meth| undef_method(meth) unless meth =~ /\A__/ }
   
-  def initialize(sequence)
-    @sequence = sequence
-  end
-  def method_missing(name, *requires, &amp;block)
-    @sequence &lt;&lt; ActionSequence::Step.new(name, block, requires)
+    def initialize(sequence)
+      @sequence = sequence
+    end
+    def method_missing(name, *requires, &amp;router)
+      @sequence &lt;&lt; ActionSequence::Step.new(name, router, requires)
+    end
+
   end
 end
-</diff>
      <filename>lib/action_sequence/initializer.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,15 +1,15 @@
-class ActionSequence::Step
-  attr_reader :block, :index, :name, :requires
+# Author:: Florian A&#223;mann
 
-  def initialize(name, block, requires = [])
-    @name, @block, @requires = name, block, requires
-  end
-  # Invokes the block for self with given walker.
-  def [](walker)
-    @block[walker]
-  end
-  # Initializes index casted to Integer once.
-  def set_index(index)
-    @index ||= Integer(index)
+class ActionSequence
+  # Stores the routing for step among its name, index and requirements.
+  class Step
+    attr_reader :index, :name, :requires, :router
+
+    def initialize(name, router, requires = [])
+      @name, @router, @requires = name, router, requires
+    end
+    def set_index(index) #:nodoc:
+      @index ||= Integer(index)
+    end
   end
-end
+end
\ No newline at end of file</diff>
      <filename>lib/action_sequence/step.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,42 +1,56 @@
-class ActionSequence::Walker
-  attr_reader :current
+# Author:: Florian A&#223;mann
 
-  def self.walk(sequence, controller, step)
-    unless step.is_a? ActionSequence::Step
-      allocate.instance_eval {
-        @sequence = sequence
-        @index    = (controller.params[ sequence.walker ] || 1).to_i - 1
-        @current  = sequence.steps_array.at @index
+class ActionSequence
+  # Invokes the routing block.
+  class Walker
+    attr_reader :current
 
-        result = controller.instance_exec(self, &amp;@current.block)
-        step = (ActionSequence::Step === result) ? result : @current
-      }
-    end
+    # Returns the next step.
+    #
+    # A walk identifies the next step as follows:
+    # * Identify the current step through walker parameter
+    #   (default: :step =&gt; 1)
+    # * Invoke routing block in controller scope with self
+    # * Invoke required controller methods for returned ActionSequence::Step
+    #   (default: current)
+    # * Return step
+    def self.walk(sequence, controller, step)
+      unless step.is_a? ActionSequence::Step
+        allocate.instance_eval {
+          @sequence = sequence
+          @index    = (controller.params[ sequence.walker ] || 1).to_i - 1
+          @current  = sequence.steps_array.at @index
 
-    step.requires.each { |req| controller.send req }
-    step
-  end
+          result = controller.instance_exec(self, &amp;@current.router)
+          step = (ActionSequence::Step === result) ? result : @current
+        }
+      end
 
-  # Returns the previous step relative to current step.
-  def previous
-    @sequence.steps_array.fetch @index - 1
-  end
-  # Returns the next step relative to current step.
-  def next
-    @sequence.steps_array.fetch @index + 1
-  end
+      step.requires.each { |req| controller.send req }
+      step
+    end
 
-  # Returns the names step.
-  def [](name)
-    @sequence.steps_hash.fetch name
-  end
+    # Returns the previous step relative to current ActionSequence::Step.
+    def previous
+      @sequence.steps_array.fetch @index - 1
+    end
+    # Returns the next step relative to current ActionSequence::Step.
+    def next
+      @sequence.steps_array.fetch @index + 1
+    end
 
-  # Calls :first on the sequence.
-  def first
-    @sequence.first
-  end
-  # Calls :last on the sequence.
-  def last
-    @sequence.last
+    # Returns the named ActionSequence::Step.
+    def [](name)
+      @sequence.steps_hash.fetch name
+    end
+
+    # Returns the first ActionSequence::Step.
+    def first
+      @sequence.steps_array.first
+    end
+    # Returns the last ActionSequence::Step.
+    def last
+      @sequence.steps_array.last
+    end
   end
-end
+end
\ No newline at end of file</diff>
      <filename>lib/action_sequence/walker.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,6 @@
 # Taken from: http://www.ruby-forum.com/topic/54096
-class Object
+
+class Object #:nodoc:
   def instance_exec(*args, &amp;block)
     mname = &quot;__instance_exec_#{ Thread.current.object_id.abs }&quot;
     class &lt;&lt; self; self end.class_eval { define_method(mname, &amp;block) }</diff>
      <filename>lib/object.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,8 +11,4 @@ describe &quot;ActionSequence::Step&quot; do
     1.upto(7) { |i| s.set_index i }
     s.index.should.be 1
   end
-  it &quot;should return the result of invoked @block&quot; do
-    s = ActionSequence::Step.new(:step, proc {|s| s})
-    s[7].should.be 7
-  end
 end</diff>
      <filename>test/action_sequence/step_test.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>README</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>0394e97d171dcf08ff04d86a299c4bbce3ca86e6</id>
    </parent>
  </parents>
  <author>
    <name>Florian A&#223;mann</name>
    <email>florian.assmann@email.de</email>
  </author>
  <url>http://github.com/boof/action_sequence/commit/13bb8ad3ce2ee7654bfa0458241be7459549eb5e</url>
  <id>13bb8ad3ce2ee7654bfa0458241be7459549eb5e</id>
  <committed-date>2008-07-14T00:45:57-07:00</committed-date>
  <authored-date>2008-07-14T00:45:57-07:00</authored-date>
  <message>Added docs.</message>
  <tree>2a494556e65abc7e9958a482d98b8dea6c2d662c</tree>
  <committer>
    <name>Florian A&#223;mann</name>
    <email>florian.assmann@email.de</email>
  </committer>
</commit>
