# Keyword\_arguments v0.0.1

**URL:** <https://www.ruby-forum.com/t/keyword-arguments-v0-0-1/172672>\
**Category:** Ruby\
**Created:** [July 25, 2009, 3:59am UTC](https://www.ruby-forum.com/t/keyword-arguments-v0-0-1/172672 "2009-07-25T03:59:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [July 25, 2009, 3:59am UTC](https://www.ruby-forum.com/t/keyword-arguments-v0-0-1/172672/1 "2009-07-25T03:59:41Z")

</div>

This is the first release (and actually my first announce on this list  
as well) of keyword\_arguments[1][2]

What it does is provide a handful of convenient methods for working  
with hashes as named arguments. Those methods allow you to specify  
required, default and allowed arguments, without the need of  
duplicating code all over your methods, without the need of even  
adding anything to your actual methods.

There is also an example[3] online, showing all three methods in action.

I know that this gem might be quite controversial because it is  
patching core classes, but I tried to take care that I won’t actually  
break anything, it should even work with other libraries that have  
their own “method describing” methods.

If you have any ideas, bugs or criticism, or even if you just  
appreciate the idea, answer this thread (or fork and patch it, heh)

Links  
[1] [http://rubyforge.org/projects/keywordargs/](http://rubyforge.org/projects/keywordargs/)  
[2] [GitHub - dominikh/keyword\_arguments: named\_arguments comes with a bunch of convenient methods for making "named arguments" (hashes as method arguments) in Ruby less painfull](http://github.com/dominikh/keyword_arguments/tree/master)  
[3]  
[http://github.com/dominikh/keyword\_arguments/blob/7c9574f926ecea514f0a4e153698c57e3b884091/README.markdown](http://github.com/dominikh/keyword_arguments/blob/7c9574f926ecea514f0a4e153698c57e3b884091/README.markdown)

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [July 25, 2009, 11:28pm UTC](https://www.ruby-forum.com/t/keyword-arguments-v0-0-1/172672/2 "2009-07-25T23:28:29Z")

</div>

This looks very useful and time-saving, thanks for posting!

Dan

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [July 29, 2009, 2:50am UTC](https://www.ruby-forum.com/t/keyword-arguments-v0-0-1/172672/3 "2009-07-29T02:50:34Z")

</div>

> On Fri, Jul 24, 2009 at 9:59 PM, [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > This is the first release (and actually my first announce on this list  
> > as well) ofkeyword\_arguments[1][2]
> 
> > What it does is provide a handful of convenient methods for working  
> > with hashes as named arguments. Those methods allow you to specify  
> > required, default and allowed arguments, without the need of  
> > duplicating code all over your methods, without the need of even  
> > adding anything to your actual methods.

Nice. Also checkout [GitHub - maca/arguments: You don't have to wait until Ruby 2.0 to get (named|keyword) arguments. Works with 1.8.6, 1.8.7 and 1.9.1. An alternative to options hash.](http://github.com/maca/arguments/tree/master) it’s  
nice 🙂  
=r
