D
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
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