Forum: Ruby method def

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
4d6cd907dcbed99b2c472a5e652dce6b?d=identicon&s=25 Anita Anita (anita)
on 2009-01-06 22:04
I know def active? but I need:
def active=(val)
and I cannot find a good example for it. I need val to equal a certain
value different that true or false when user is active.

Thank you,
Anita
Bec38d63650c8912b6ba9b557fb953b9?d=identicon&s=25 Roger Pack (rogerdpack)
on 2009-01-08 07:41
Anita Anita wrote:
> I know def active? but I need:
> def active=(val)
> and I cannot find a good example for it. I need val to equal a certain
> value different that true or false when user is active.

looks like you know what you're doing.  What context is this?
might want to google 'attr_accessor'
This topic is locked and can not be replied to.