From: Alexey Vakhov Date: 2006-08-10T01:36:00+09:00 Subject: Re: Why is this returning nil? Oh. Some mistake. Change it to print " #{@level}" of course :) 2006/8/9, Alexey Vakhov : > Hello! > > You forgot quotes in line print #{@level}. Change it to "print > #{@level}" please. > > 2006/8/9, Dark Ambient : > > class User > > > > def initialize(level, status) > > @level = level > > @status = status > > end > > > > def finda > > if @status == "active" > > print #{@level} > > else > > puts "user not exist" > > end > > end > > end > > > > user1 = User.new(1, "active") > > user2 = User.new(1, "inactive") > > user3 = User.new(2, "active") > > user4 = User.new(3, "inactive") > > > > user1.finda > > > > Something wrong ..not sure > > TIA > > Stuart > > > > > > > -- > Alexey Vakhov mailto:vakhov@gmail.com > -- Alexey Vakhov mailto:vakhov@gmail.com