def to_ruby(result = '')
      result << "#{name} = Protocol do"
      first = true
      if messages.empty?
        result << "\n"
      else
        messages.each do |m|
          result << "\n"
          m.to_ruby(result)
        end
      end
      result << "end\n"
    end
def to_ruby(result = '')
      result << "#{name} = Protocol do"
      first = true
      if messages.empty?
        result << "\n"
      else
        messages.each do |m|
          result << "\n"
          m.to_ruby(result)
        end
      end
      result << "end\n"
    end
Concatenates the protocol as Ruby code to the +result+ string and return
 it. At the moment this method only supports method signatures with
 generic argument names.