...he means like this, I believe:
class Foo
def initialize
@bar = nil
@state = true
end
def bar=(nbar)
@bar = nbar.size > 2 ? [nbar.first, nbar.last] : nbar
end
def bar
@state = ! @state
return @state ? @bar : [nil, nil]
end
end
Sucky example, but it shows the complexity that he might need, and it's fun
But he got, so it's all good. *goes off the learn some python*