Permalink
Browse files

Code focs for MethodAssemblyStep

  • Loading branch information...
1 parent c86d989 commit 467ac6b0c9c3684225e7a600286b33988d658361 @dcrosby42 dcrosby42 committed Jun 7, 2012
Showing with 12 additions and 2 deletions.
  1. +0 −2 documentation_todo.txt
  2. +12 −0 lib/piece_pipe/method_assembly_step.rb
View
@@ -1,5 +1,3 @@
-MethodStep
-MethodAssemblyStep
TapStep
MapStep
HashedAggregator
@@ -1,4 +1,16 @@
module PiecePipe
+ # Essentially the same thing as MethodStep with AssemblyStep semantics.
+ #
+ # Because we don't have a clever way to determine that you might want to create
+ # an assembly line out of wrapped methods, you need to use the conveneince method Pipeline#assembly_step, eg.
+ #
+ # PiecePipe::Pipeline.new.assembly_step(:add_seatbelts)
+ #
+ # Currently only supports arity-1 methods: the parameter will be the inputs Hash,
+ # the return is expected to be a Hash that will be produced via AssemblyStep#install.
+ #
+ # TODO; add support for arity-2 method wrapping to allow for zero-or-more #intall calls
+ #
class MethodAssemblyStep < AssemblyStep
def initialize(meth)
@method = meth

0 comments on commit 467ac6b

Please sign in to comment.