[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[patch] Use hash for optional args with long argument list in Ruby bindings

From: Joe Swatosh <joe.swatosh_at_gmail.com>
Date: 2007-11-13 04:23:13 CET

Hi kou,

I suggested a patch like this a while back, but you wanted to make it a new
api and to check the hash options. So that's what is different in this one.

Although I didn't modify Hash for checking like the example from ActiveSupport
that you showed. It didn't seem right to modify a standard class from the SVN
bindings.

Here's hoping this is more like what you had in mind.

--
Joe
[[[
Use a hash to simulate named arguments instead of a long list of optional
arguments.
* subversion/bindings/swig/ruby/test/test_wc.rb
  (SvnWcTest#test_update_editor_options): New test
* subversion/bindings/swig/ruby/svn/wc.rb
  (Svn::Client::Context#update_editor2,Svn::Client::Context#switch_editor2):
   Use a hash of optional arguments instead of a very long argument list.
  (Svn::Client::Context#validate_options): New method to ensure hash arguments
   are understood.
]]]


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Tue Nov 13 04:23:25 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.