Hi all,
I thought it to be good programming style to make attribute assignment
chainable. When using the attr_writer an assignment returns te value
assigned which is not what I want, so I tried to do-it-myself.
The result is below. This doesn't work. When running Ruby gives:
undefined method 'b=' for "AA":String (NoMethodError)
Anybody, please tell me: *why*. What simple stuppid thing am I
overseeing?
Thanks in advance!
Cheers,
Paul

--the code--
class A
  def initialize
  end
  def a
    return @a
  end
  def a=(someA)
    @a = someA
    return self
  end
  def b
    return @b
  end
  def b=(someB)
    @b = someB
    return self
  end
end

puts A.new.a=("AA").b=("BB").a
--the code--