lib/respect/org3_dumper.rb
def dispatch(prefix, klass, object, *args, &block)
      symbol = "#{prefix}_for_#{klass.name.demodulize.underscore}"
      if respond_to? symbol
        send(symbol, object, *args, &block)
      else
        if klass == BasicObject
          raise NoMethodError, "undefined method '#{symbol}' for schema class #{object.class}"
        else
          dispatch(prefix, klass.superclass, object, *args, &block)
        end
      end
    end
def dispatch(prefix, klass, object, *args, &block)
      symbol = "#{prefix}_for_#{klass.name.demodulize.underscore}"
      if respond_to? symbol
        send(symbol, object, *args, &block)
      else
        if klass == BasicObject
          raise NoMethodError, "undefined method '#{symbol}' for schema class #{object.class}"
        else
          dispatch(prefix, klass.superclass, object, *args, &block)
        end
      end
    end
def dispatch ( prefix , klass , object , * args , & block ) symbol = "#{prefix}_for_#{klass.name.demodulize.underscore}" if respond_to? symbol send ( symbol , object , args , block ) else if klass == BasicObject raise NoMethodError , "undefined method '#{symbol}' for schema class #{object.class}" else dispatch ( prefix , klass . superclass , object , args , block ) end end end
Perform a virtual dispatch on a single object.
 FIXME(Nicolas Despres): Get me out of here and test me.
Perform a virtual dispatch on a single object . FIXME ( Nicolas Despres ) : Get me out of here and test me .