[rspec-users] NameError when passing a URL helper to a method

Mark Wilden mark at mwilden.com
Thu Dec 4 20:27:16 EST 2008

On Thu, Dec 4, 2008 at 4:56 PM, Pat Maddox <pergesu at gmail.com> wrote:

> class Foo
>  @class_instance_variable = "blah"
>  def foo
>    puts @class_instance_variable
>  end
> end
> Foo.foo will print nothing, because @class_instance_variable is nil in
> the object instance.

I don't know if it matters here, but you can define a class method to return
a class instance variable.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081204/e156cebf/attachment.html>

More information about the rspec-users mailing list