# The meanings of Asterisk (and Webby)

**URL:** <https://www.ruby-forum.com/t/the-meanings-of-asterisk-and-webby/129467>\
**Category:** Ruby\
**Created:** [February 18, 2008, 9:47pm UTC](https://www.ruby-forum.com/t/the-meanings-of-asterisk-and-webby/129467 "2008-02-18T21:47:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![leslieviljoen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/3d9bf3/32.png) [@leslieviljoen](https://www.ruby-forum.com/u/leslieviljoen)\
**Post date:** [February 18, 2008, 9:47pm UTC](https://www.ruby-forum.com/t/the-meanings-of-asterisk-and-webby/129467/1 "2008-02-18T21:47:18Z")

</div>

Hi all!

I have a class that is used in a Webby page. The class needs to make  
use of a function within three modules:

* * *

## module Webby module Helpers #:nodoc: module UrlHelper

Since the function is an “instance”  
function, I need to include the modules like so:

* * *

## class Categoriser include Webby::Helpers::UrlHelper

Later in my class I have (bear with me):

* * *

## def render … html \<\< %[
- #{link\_to\_page(:title =\> r.title)} 
]

link\_to\_page (within the three modules) looks like this:

* * *

## def link\_to\_page( _args ) self.link\_to(_\_find\_page(args)) end

And gives me:  
NoMethodError Exception: undefined method `find’ for nil:NilClass

I can’t find any reference to this usage of the asterisk, and  
I don’t know what the \*\_find\_page does. Can anyone explain it to me?

Les

---

<div class="post-metadata">

**Author:** ![leslieviljoen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/3d9bf3/32.png) [@leslieviljoen](https://www.ruby-forum.com/u/leslieviljoen)\
**Post date:** [February 18, 2008, 10:06pm UTC](https://www.ruby-forum.com/t/the-meanings-of-asterisk-and-webby/129467/2 "2008-02-18T22:06:18Z")

</div>

On Feb 18, 2008 9:46 PM, Leslie V. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> * * *
> 
> ## end
> 
> And gives me:  
> NoMethodError Exception: undefined method `find’ for nil:NilClass
> 
> I can’t find any reference to this usage of the asterisk, and  
> I don’t know what the \*\_find\_page does. Can anyone explain it to me?

It’s called the ‘splat’ operator.

see e.g.

> **[Ruby idioms : The splat operator.](https://theplana.wordpress.com/2007/03/03/ruby-idioms-the-splat-operator/)**
>
> The split mode : pet1, pet2, pet3 = \*\[“duck”,”dog”,”cat”\] The collect mode : \*zoo = pet1, pet2, pet3 The splat operator can be used in a case statement : BOARD\_M…

[http://redhanded.hobix.com/bits/theSiphoningSplat.html](http://redhanded.hobix.com/bits/theSiphoningSplat.html)

> **[Nooks and Crannies of Ruby](http://ola-bini.blogspot.com/2006/11/nooks-and-crannies-of-ruby.html)**
>
> There are many small parts of Ruby, tips, tricks and strange things. I thought that I would write about some of the more interesting of thes...

---

<div class="post-metadata">

**Author:** ![leslieviljoen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/3d9bf3/32.png) [@leslieviljoen](https://www.ruby-forum.com/u/leslieviljoen)\
**Post date:** [February 19, 2008, 9:44am UTC](https://www.ruby-forum.com/t/the-meanings-of-asterisk-and-webby/129467/3 "2008-02-19T09:44:30Z")

</div>

Thanks! I now know splats!
