Author: kclark
Date: Tue Jun 17 17:51:06 2008
New Revision: 668895

URL: http://svn.apache.org/viewvc?rev=668895&view=rev
Log:
Style tweaks

Modified:
    incubator/thrift/trunk/lib/rb/lib/thrift/server/thttpserver.rb
    incubator/thrift/trunk/lib/rb/lib/thrift/transport/thttpclient.rb
    incubator/thrift/trunk/lib/rb/lib/thrift/transport/ttransport.rb

Modified: incubator/thrift/trunk/lib/rb/lib/thrift/server/thttpserver.rb
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/lib/thrift/server/thttpserver.rb?rev=668895&r1=668894&r2=668895&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/lib/thrift/server/thttpserver.rb (original)
+++ incubator/thrift/trunk/lib/rb/lib/thrift/server/thttpserver.rb Tue Jun 17 
17:51:06 2008
@@ -9,12 +9,12 @@
 ## Sticks a service on a URL, using mongrel to do the HTTP work
 class TSimpleMongrelHTTPServer
   class Handler < Mongrel::HttpHandler
-    def initialize processor, protocol_factory
+    def initialize(processor, protocol_factory)
       @processor = processor
       @protocol_factory = protocol_factory
     end
 
-    def process request, response
+    def process(request, response)
       unless request.params["REQUEST_METHOD"] == "POST"
         response.start(404) { } # better way?
         return
@@ -28,7 +28,7 @@
     end
   end
 
-  def initialize processor, opts={}
+  def initialize(processor, opts={})
     port = opts[:port] || 80
     ip = opts[:ip] || "0.0.0.0"
     path = opts[:path] || ""

Modified: incubator/thrift/trunk/lib/rb/lib/thrift/transport/thttpclient.rb
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/lib/thrift/transport/thttpclient.rb?rev=668895&r1=668894&r2=668895&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/lib/thrift/transport/thttpclient.rb (original)
+++ incubator/thrift/trunk/lib/rb/lib/thrift/transport/thttpclient.rb Tue Jun 
17 17:51:06 2008
@@ -8,14 +8,14 @@
 
 ## Very simple HTTP client
 class THttpClient < TTransport
-  def initialize url
+  def initialize(url)
     @url = URI url
     @outbuf = ""
   end
 
   def isOpen; true end
-  def read sz; @inbuf.read sz end
-  def write buf; @outbuf << buf end
+  def read(sz); @inbuf.read sz end
+  def write(buf); @outbuf << buf end
   def flush
     http = Net::HTTP.new @url.host, @url.port
     resp, data = http.post(@url.path, @outbuf)

Modified: incubator/thrift/trunk/lib/rb/lib/thrift/transport/ttransport.rb
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/lib/thrift/transport/ttransport.rb?rev=668895&r1=668894&r2=668895&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/lib/thrift/transport/ttransport.rb (original)
+++ incubator/thrift/trunk/lib/rb/lib/thrift/transport/ttransport.rb Tue Jun 17 
17:51:06 2008
@@ -275,12 +275,12 @@
 ##
 ## Assumes both objects are open, remain open, don't require flushing, etc.
 class TIOStreamTransport < TTransport
-  def initialize input, output
+  def initialize(input, output)
     @input = input
     @output = output
   end
 
-  def isOpen(); true end
+  def isOpen; true end
   def read(sz); @input.read(sz) end
   def write(buf); @output.write(buf) end
 end


Reply via email to