Help with attribute structure

Any help would be great

I keep on getting this error, I know its my code not ruby any help would be
good

c:/dev/cgi-bin/Project.rb:52: nested method definition
[Fri Sep 20 11:16:19 2002] [error] [client 127.0.0.1] def
StatusCode(val=nil)

Here is the attribute code:

def StatusCode(val=nil)
@data[‘prj_status’] = val unless val.nil? == False
return @data['prj_status]
end

Many thanks

Graeme Matthew
Analyst Programmer
Mercer Investment Consulting
Level 29, 101 Collins Street, Melbourne, VIC, 3001, Australia
Tel - 61 3 9245 5352 Fax - 61 3 9245 5330
visit http://www.merceric.com

···

__


This e-mail and any attachments may be confidential or legally privileged.
If you received this message in error or are not the intended recipient, you
should destroy the e-mail message and any attachments or copies, and you are
prohibited from retaining, distributing, disclosing or using any information
contained herein. Please inform us of the erroneous delivery by return
e-mail.

Thank you for your cooperation.


ec03/04

Hi,

···

In message “Help with attribute structure” on 02/09/20, “Matthew, Graeme” Graeme.Matthew@mercer.com writes:

I keep on getting this error, I know its my code not ruby any help would be
good

“nested method definition” means you’re defining a new method within a
body of another method. Does this help you?

						matz.

Do you really have a missing quote on
this line?

Hal

···

----- Original Message -----
From: “Matthew, Graeme” Graeme.Matthew@mercer.com
To: “ruby-talk ML” ruby-talk@ruby-lang.org
Sent: Thursday, September 19, 2002 8:21 PM
Subject: Help with attribute structure

return @data['prj_status]

Usually means you haven’t ended a prior method, class, or other
end-requiring block correctly. If you have an auto-indenting editor it can
probably help you discover where this is happening.

-michael

···

On Thursday 19 September 2002 20:21, Matthew, Graeme wrote:

c:/dev/cgi-bin/Project.rb:52: nested method definition
[Fri Sep 20 11:16:19 2002] [error] [client 127.0.0.1] def

++++++++++++++++++++++++++++++++++++++++++
Michael C. Libby x@ichimunki.com
public key: http://www.ichimunki.com/public_key.txt
web site: http://www.ichimunki.com
++++++++++++++++++++++++++++++++++++++++++