Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[ANN] rdp-arguments -- named arguments for 1.8 and 1.9!

1 view
Skip to first unread message

Roger Pack

unread,
Jan 2, 2010, 9:41:54 PM1/2/10
to
Though I can't take much credit for this (the original author is maca
[1]), in case it's useful, here's a pretty stable release of the
arguments gem.

usage

class A
def go(a = 3, b = 4)
[a, b]
end
named_args :go
end

>> A.new.go(3, 4)
=> [3, 4]
>> A.new.go(:a => 3, :b => 4)
=> [3, 4]

Compatible with 1.8.x, and 1.9.x

Ahh.
Enjoy and happy new year.

http://github.com/rdp/arguments
-r

[1] http://github.com/maca/arguments
--
Posted via http://www.ruby-forum.com/.

Michael Fellinger

unread,
Jan 2, 2010, 11:50:57 PM1/2/10
to
On Sun, Jan 3, 2010 at 11:41 AM, Roger Pack <rogerp...@gmail.com> wrote:
> Though I can't take much credit for this (the original author is maca
> [1]), in case it's useful, here's a pretty stable release of the
> arguments gem.

The README is wrong about install, github doesn't build gems anymore,
and the name doesn't match your repo anyway.
Looks interesting, will check it out.

>
> usage
>
> class A
>  def go(a = 3, b = 4)
>   [a, b]
>  end
>  named_args :go
> end
>
>>> A.new.go(3, 4)
> => [3, 4]
>>> A.new.go(:a => 3, :b => 4)
> => [3, 4]
>
> Compatible with 1.8.x, and 1.9.x
>
> Ahh.
> Enjoy and happy new year.
>
> http://github.com/rdp/arguments
> -r
>
> [1] http://github.com/maca/arguments
> --
> Posted via http://www.ruby-forum.com/.
>
>

--
Michael Fellinger
CTO, The Rubyists, LLC

Roger Pack

unread,
Jan 3, 2010, 9:56:23 PM1/3/10
to
ichael Fellinger wrote:
> On Sun, Jan 3, 2010 at 11:41 AM, Roger Pack <rogerp...@gmail.com>
> wrote:
>> Though I can't take much credit for this (the original author is maca
>> [1]), in case it's useful, here's a pretty stable release of the
>> arguments gem.
>
> The README is wrong about install, github doesn't build gems anymore,
> and the name doesn't match your repo anyway.
> Looks interesting, will check it out.

oops my bad.
That's now

$ gem install rdp-arguments

Thanks!
-r

0 new messages